From 844e780accd855c51c6d3cc1a786927eff586b33 Mon Sep 17 00:00:00 2001
From: Rick Ley
Date: Mon, 4 Oct 2021 13:35:38 -0700
Subject: [PATCH] Blob encryption scope sas api view (#24526)
* ADT ownership transitioning (#24404)
* Remove SchemaRegistryClient caching (#24380)
* Remove builder caching references.
* Remove caching from SchemaRegistryAsyncClient.
Make methods public for Response.
* Remove cached tests.
* Adding service annotation.
* [Amqp-core, EH]: Prepending namespace|entitypath consistenty in log, first untrack processor subscriber then notify and adding retry to EventHubConsumer[Receiver]Client (#24417)
* Added encryption scope blob sas
* Hide HttpHeaders.toMultiMap API (#24428)
* . (#24440)
* mgmt, bug fix, container group without ports (#24418)
* Update TRC in Azure Core (#24436)
* Sync eng/common directory with azure-sdk-tools for PR 2046 (#24431)
* Pass package name from calling pipeline to uniquely identify pull request review
* Update log summary
* Update eng/common/scripts/Detect-Api-Changes.ps1
Co-authored-by: Wes Haggard
Co-authored-by: praveenkuttappan
Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com>
Co-authored-by: Wes Haggard
* Enable API change detection in PR pipeline (#24234)
* Enable API change detection in PR pipeline
* Communication: Add TokenCredentialAddHostHeaderPolicy for TokenCredential Requests (#24442)
* Communication: Add TokenCredentialAdditionalHeaderPolicy for CallingServerClientBuilder
* Add TokenCredentialAddHostHeaderPolicyTests
* Fixing comment
* Use URL class to get hostname
* Fix style errors
Co-authored-by: Melissa Neubert
* Add Compliance stage with policheck (#24276)
* Add Compliance stage with policheck
* Add vmImage pool
* Fix issues flagged by PoliCheck
* Move credscan into the compliance stage
* update readme for storage libraries to include BOM information. (#22858)
update readme for storage libraries
* Enable dependency validation of a single library (#24241)
* Enable validation of a library via it's POM file.
* Incorporate feedback and remove unused code.
* PR feedback
* Move Form Recognizer beta to public (#24453)
* Increment version for appconfiguration releases (#24450)
* Rename certificates-refresh-interval to certificates-refresh-interval--in-ms in keyvault jca (#24339)
* Prepare to release azure-spring-bom and azure-spring-cloud-dependencies. (#24425)
* mgmt, support validateMoveResources (#24465)
* Updated `KeyVaultCredentialPolicy` to extend `BearerTokenAuthenticationPolicy` in Key Vault clients. (#24199)
* Replaced all uses of KeyVaultCredentialPolicy with BearerTokenAuthenticationPolicy in Key Vault clients. Removed the KeyVaultCredentialPolicy and ScopeTokeCache classes from all Track 2 Key Vault libraries.
* We now pass the appropriate scope to BearerTokenAuthenticationPolicy creating a new instance in client builders, tests and samples.
* Added tests and recordings for KEK tests on MHSM. Fixed and cleaned up tests.
* Removed unused imports.
* Renamed MHSM_SCOPE to MANAGED_HSM_SCOPE in all client builders.
* Reintroduced KeyVaultCredentialPolicy and modified it to extend from BearerTokenAuthenticationPolicy while extracting the scope provided in bearer challenges returned by the Key Vault service.
* Fixed CvheckStyle errors.
* Made changes to KeyVaultCredentialPolicy so we don't set the body of a request as null, but an empty String instead.
* Removed scope constants from Key vault client builders.
* Attempted to fix flaky live tests.
* Removed verify test for HSM as the FromSource test already verifies the build's code coverage and running in parallel against the same HSM can cause problems for some tests.
* Reverted KeyVaultCredentialPolicy in all libraries to set the request body to null instead of an empty string when sending the first unauthenticated request to get a bearer challenge. Also stored the value of the "Content-Length" header in the pipeline context for use in a subsequent request.
* Fixed KV Administration client live tests that failed due to the authentication policy changes. Also fixed some flaky live tests.
* Fixed CheckStyle issues.
* Fixed another CheckStyle issue.
* Fixed issue that caused an NPE in KeyVaultCredentialPolicy if the content of the request being originally sent were null from the beginning.
* Updated KeyVaultCredentialPolicy in all other libraries.
* Made an attempt at fixing the backup async live tests.
* Added sleep timer when running against service for restore operations.
* Applied PR feedback.
* [Storage] Try GMavenPlus to unblock Java 17 adoption. (#24471)
* lets try.
* fix java8
* fix java8 again:/
* track 1
* Update Form recognizer readme (#24476)
* [Storage] Bump Groovy version to 3 that works with Java 17. (#24477)
* bump groovy version
* Revert "bump groovy version"
This reverts commit a80c805523eb1469a25129e8e5852d9961875bae.
* use different spocks depending on java version.
* rename.
* Use New Javadoc Codesnippet Tooling to Support Java 17 (#24475)
Use New Javadoc Snippet Tooling to Support Java 17
* Delete unused tests pipeline for track 1 blob package (#24488)
* [Storage] Fix track 1 tests. (#24490)
* Fix track 1 tests.
* revert that.
* Use Different Dummy Javadoc Option (#24491)
* Update Jackson, Netty, and Reactor Versions (#24312)
* Adding additional logging to ReactorDispatcher and ReactorExecutor. Adding closing logic (#24457)
* Closing ReactorExecutor if it has never been run.
* Adding documentation to ReactorDispatcher.
* Updating ReactorExecutor to schedule close work when reactor has not started or scheduler is closed.
* Adding tests.
* In method invocations, adding catch for RejectedExecutionException in the case that the scheduler is disposed.
* Adding assertion for ReactorExecutorTest that an onError is also called.
* Adding documentatioln to reactor connection and timeout to closing execturo.
* Splitting try/catch conditions.
* Add documentation to RequestResponseChannel.
* Using testPublisher for AmqpChannelProcessorTest. Using Flux.never().
* Adding Andy to the IoT CODEOWNERS (#24438)
Adding Andy to the IoT CODEOWNERS
* [Form Recognizer] Update to latest swagger (#24494)
* Update docker-start-proxy.ps1 (#24495)
Update to the latest version of the container
Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
* Added support for Key Rotation. (#24452)
* Added support for Key Rotation.
* Added tests and updated recordings where necessary.
* Added code snippets for Key Rotation. Updated client documentation and existing code snippets.
* Applied PR feedback.
* Removed unused import.
* Updated releaseKey test for MHSM.
* Fixed tests after merge from main.
* Renamed Mixed Audio models ( Addressed comments in apiview ) (#24481)
* Suggestions after apiview review
* Changes for the comments of API Review
* tests added back
* Added StartRecordingOptions class
* Annotation added for new class
* Setters return type changed
* Renaming enum names ( feedback on APIView review )
Co-authored-by: Ninika Sharma
* Prepare Azure Core Libraries for October 2021 Release (#24498)
Prepare Azure Core Libraries for October 2021 Release
* [EventGrid] Regenerate code using the latest rest commit sha (#24482)
* Add Storage Live Test Run to Core Live Test Run (#24499)
Add Storage Live Test Run to Core Live Test Run
* [Storage] Run CI and live tests on Java 17 (#24492)
* does this work?
* try this.
* Revert "try this."
This reverts commit f157e60d1f69e7c1933bd3cc0cbea9e7658e0bd7.
* does this help ?
* hmm?
* hungry?
* use java 17 in ci.
* fix at least nio.
* move it.
* fixes.
* disable these tests on java 17. CGLib doesn't work
* fix that.
* add support for setting throughput on database creation (#24456)
* add support for setting throughput on database creation
* added section to readme
* removed locale from links
* fix checkstyle issues
* do not overwrite cosmosTemplate
* Increment version for core releases (#24504)
Increment package version after release of Core libraries
* fix(*): use library RedirectPolicy now that it is available (#24502)
* Fix azure-core-http-jdk-httpclient Tests (#24511)
Fix azure-core-http-jdk-httpclient Tests
* Add Form recognizer migration guide (#24472)
* Fixed some test build failures
Co-authored-by: David R. Williamson
Co-authored-by: Connie Yau
Co-authored-by: Anu Thomas Chandy
Co-authored-by: Alan Zimmer <48699787+alzimmermsft@users.noreply.github.com>
Co-authored-by: Soyoung Eom
Co-authored-by: Weidong Xu
Co-authored-by: Vinay Gera
Co-authored-by: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com>
Co-authored-by: praveenkuttappan
Co-authored-by: praveenkuttappan <55455725+praveenkuttappan@users.noreply.github.com>
Co-authored-by: Wes Haggard
Co-authored-by: Melissa Neubert
Co-authored-by: Melissa Neubert
Co-authored-by: Chidozie Ononiwu (His Righteousness) <31145988+chidozieononiwu@users.noreply.github.com>
Co-authored-by: Pallavi Taneja
Co-authored-by: Sameeksha Vaity
Co-authored-by: liuzhicheng <70368631+zhichengliu12581@users.noreply.github.com>
Co-authored-by: Rujun Chen
Co-authored-by: vcolin7
Co-authored-by: Kamil Sobol <61715331+kasobol-msft@users.noreply.github.com>
Co-authored-by: jamdavi <73593426+jamdavi@users.noreply.github.com>
Co-authored-by: Sean Kane <68240067+seankane-msft@users.noreply.github.com>
Co-authored-by: ninikasharma <67986119+ninikasharma@users.noreply.github.com>
Co-authored-by: Ninika Sharma
Co-authored-by: Shawn Fang <45607042+mssfang@users.noreply.github.com>
Co-authored-by: Blackbaud-MikeLueders
Co-authored-by: Christian Whitehead (MSFT) <35080559+chrwhit@users.noreply.github.com>
---
.github/CODEOWNERS | 4 +-
common/perf-test-core/pom.xml | 8 +-
common/smoke-tests/pom.xml | 8 +-
eng/bomgenerator/generateAzureSDKBOM.cmd | 5 -
eng/bomgenerator/generateAzureSDKBOM.ps1 | 28 +
eng/bomgenerator/pom.xml | 11 +-
eng/bomgenerator/readme.md | 15 +-
.../tools/bomgenerator/BomGenerator.java | 104 +-
.../com/azure/tools/bomgenerator/Main.java | 77 +-
.../com/azure/tools/bomgenerator/Utils.java | 45 +-
.../tools/bomgenerator/models/BOMReport.java | 2 -
.../models/ConflictingDependency.java | 4 -
.../checkstyle/checkstyle-suppressions.xml | 14 -
.../src/main/resources/revapi/revapi.json | 26 +-
.../resources/spotbugs/spotbugs-exclude.xml | 78 +-
eng/common/scripts/Detect-Api-Changes.ps1 | 15 +-
eng/common/testproxy/docker-start-proxy.ps1 | 4 +-
.../policheck/PolicheckExclusions.xml | 12 +
eng/jacoco-test-coverage/pom.xml | 10 +-
eng/pipelines/aggregate-reports.yml | 376 +-
.../scripts/generate_overview_from_readme.py | 24 +-
eng/pipelines/templates/jobs/ci.yml | 4 +
eng/spotbugs-aggregate-report/pom.xml | 2 +-
eng/versioning/external_dependencies.txt | 59 +-
eng/versioning/version_client.txt | 33 +-
pom.xml | 4 +-
.../azure-resourcemanager-advisor/pom.xml | 4 +-
.../azure-verticals-agrifood-farming/pom.xml | 10 +-
.../azure-ai-anomalydetector/pom.xml | 6 +-
.../pom.xml | 4 +-
.../azure-data-appconfiguration/pom.xml | 10 +-
.../pom.xml | 4 +-
.../CHANGELOG.md | 10 +
.../pom.xml | 4 +-
.../CHANGELOG.md | 10 +
.../pom.xml | 14 +-
.../CHANGELOG.md | 10 +
.../pom.xml | 6 +-
.../CHANGELOG.md | 10 +
.../pom.xml | 6 +-
.../CHANGELOG.md | 10 +
.../pom.xml | 6 +-
.../pom.xml | 2 +-
.../pom.xml | 12 +-
.../pom.xml | 12 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-attestation/pom.xml | 4 +-
.../azure-security-attestation/pom.xml | 6 +-
.../pom.xml | 2 +-
.../azure-resourcemanager-automation/pom.xml | 4 +-
sdk/avs/azure-resourcemanager-avs/pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-azurestack/pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
sdk/batch/azure-resourcemanager-batch/pom.xml | 6 +-
sdk/batch/microsoft-azure-batch/pom.xml | 4 +-
.../azure-resourcemanager-batchai/pom.xml | 4 +-
.../azure-resourcemanager-billing/pom.xml | 4 +-
sdk/boms/azure-spring-boot-bom/pom.xml | 72 +-
.../azure-spring-cloud-dependencies/pom.xml | 78 +-
.../azure-resourcemanager-botservice/pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../ms-azure-cs-autosuggest/pom.xml | 2 +-
.../ms-azure-cs-computervision/pom.xml | 2 +-
.../ms-azure-cs-contentmoderator/pom.xml | 2 +-
.../ms-azure-cs-customimagesearch/pom.xml | 2 +-
.../ms-azure-cs-customsearch/pom.xml | 2 +-
.../pom.xml | 2 +-
.../ms-azure-cs-customvision-training/pom.xml | 2 +-
.../ms-azure-cs-entitysearch/pom.xml | 2 +-
.../ms-azure-cs-faceapi/pom.xml | 2 +-
.../ms-azure-cs-imagesearch/pom.xml | 2 +-
.../ms-azure-cs-luis-authoring/pom.xml | 2 +-
.../ms-azure-cs-luis-runtime/pom.xml | 2 +-
.../ms-azure-cs-newssearch/pom.xml | 2 +-
.../ms-azure-cs-qnamaker/pom.xml | 2 +-
.../ms-azure-cs-spellcheck/pom.xml | 2 +-
.../ms-azure-cs-textanalytics/pom.xml | 2 +-
.../ms-azure-cs-videosearch/pom.xml | 2 +-
.../ms-azure-cs-visualsearch/pom.xml | 2 +-
.../ms-azure-cs-websearch/pom.xml | 2 +-
.../azure-resourcemanager-commerce/pom.xml | 4 +-
.../azure-communication-callingserver/pom.xml | 8 +-
.../CallingServerClientBuilder.java | 33 +-
.../callingserver/ServerCallAsync.java | 6 +-
.../TokenCredentialAddHostHeaderPolicy.java | 38 +
.../implementation/RedirectPolicy.java | 70 -
.../models/RecordingChannel.java | 34 +
.../models/RecordingChannelType.java | 34 -
.../models/RecordingContent.java | 34 +
.../models/RecordingContentType.java | 34 -
.../models/RecordingFormat.java | 37 +
.../models/RecordingFormatType.java | 37 -
.../models/StartCallRecordingRequest.java | 25 +-
.../models/RecordingChannel.java | 34 +
.../models/RecordingChannelType.java | 34 -
.../models/RecordingContent.java | 34 +
.../models/RecordingContentType.java | 34 -
.../callingserver/models/RecordingFormat.java | 37 +
.../models/RecordingFormatType.java | 37 -
.../models/StartRecordingOptions.java | 54 +-
.../callingserver/ServerCallUnitTests.java | 18 +-
...kenCredentialAddHostHeaderPolicyTests.java | 110 +
.../implementation/RedirectPolicyTests.java | 30 +-
.../swagger/README.md | 29 +-
.../azure-communication-chat/pom.xml | 6 +-
.../azure-communication-common/pom.xml | 6 +-
.../azure-communication-identity/pom.xml | 8 +-
.../pom.xml | 8 +-
.../azure-communication-phonenumbers/pom.xml | 8 +-
.../azure-communication-sms/pom.xml | 8 +-
.../pom.xml | 4 +-
.../azure-security-confidentialledger/pom.xml | 10 +-
.../azure-resourcemanager-confluent/pom.xml | 6 +-
.../azure-resourcemanager-consumption/pom.xml | 4 +-
.../pom.xml | 10 +-
sdk/core/azure-core-amqp-experimental/pom.xml | 5 +-
sdk/core/azure-core-amqp/pom.xml | 7 +-
.../amqp/exception/AmqpErrorCondition.java | 3 +
.../core/amqp/exception/AmqpErrorContext.java | 7 +
.../core/amqp/exception/AmqpException.java | 11 +
.../core/amqp/exception/AmqpResponseCode.java | 141 +
.../core/amqp/exception/LinkErrorContext.java | 7 +
.../amqp/exception/SessionErrorContext.java | 4 +
.../implementation/AmqpChannelProcessor.java | 38 +-
.../implementation/ReactorConnection.java | 26 +-
.../implementation/ReactorDispatcher.java | 29 +-
.../amqp/implementation/ReactorExecutor.java | 28 +-
.../amqp/implementation/ReactorReceiver.java | 17 +-
.../amqp/implementation/ReactorSender.java | 16 +-
.../amqp/implementation/ReactorSession.java | 12 +-
.../RequestResponseChannel.java | 6 +-
.../handler/SessionHandler.java | 5 +-
.../azure/core/amqp/models/AmqpAddress.java | 9 +-
.../core/amqp/models/AmqpMessageBody.java | 144 +-
.../azure/core/amqp/models/AmqpMessageId.java | 9 +-
.../AmqpChannelProcessorTest.java | 6 +-
.../implementation/ReactorExecutorTest.java | 383 ++
.../amqp/implementation/RetryUtilTest.java | 7 +-
sdk/core/azure-core-experimental/CHANGELOG.md | 16 +-
sdk/core/azure-core-experimental/README.md | 2 +-
sdk/core/azure-core-experimental/pom.xml | 9 +-
.../TokenRequestContextExperimental.java | 78 -
.../experimental/credential/package-info.java | 7 -
.../experimental/http/DynamicRequest.java | 58 +-
.../experimental/http/DynamicResponse.java | 19 +-
.../src/main/java/module-info.java | 1 -
.../azure-core-http-jdk-httpclient/pom.xml | 20 +-
.../jdk/httpclient/JdkAsyncHttpClient.java | 13 +-
.../httpclient/JdkAsyncHttpClientBuilder.java | 20 +-
.../http/jdk/httpclient/JdkHttpResponse.java | 6 +-
.../JdkAsyncHttpClientBuilderTests.java | 11 +-
sdk/core/azure-core-http-netty/CHANGELOG.md | 14 +
sdk/core/azure-core-http-netty/README.md | 2 +-
sdk/core/azure-core-http-netty/pom.xml | 47 +-
.../netty/NettyAsyncHttpClientBuilder.java | 62 +-
.../NettyToAzureCoreHttpHeadersWrapper.java | 3 +-
.../src/main/java/module-info.java | 1 -
.../implementation/TimeoutTestHelpers.java | 2 +
sdk/core/azure-core-http-okhttp/CHANGELOG.md | 8 +
sdk/core/azure-core-http-okhttp/README.md | 2 +-
sdk/core/azure-core-http-okhttp/pom.xml | 9 +-
sdk/core/azure-core-jackson-tests/pom.xml | 41 +-
sdk/core/azure-core-management/CHANGELOG.md | 8 +
sdk/core/azure-core-management/README.md | 2 +-
sdk/core/azure-core-management/pom.xml | 7 +-
.../CHANGELOG.md | 10 +-
.../README.md | 2 +-
.../azure-core-serializer-avro-apache/pom.xml | 11 +-
.../pom.xml | 10 +-
.../CHANGELOG.md | 9 +
.../azure-core-serializer-json-gson/README.md | 2 +-
.../azure-core-serializer-json-gson/pom.xml | 12 +-
.../CHANGELOG.md | 9 +
.../README.md | 2 +-
.../pom.xml | 7 +-
.../JacksonMemberNameConverterTests.java | 1 +
sdk/core/azure-core-test/CHANGELOG.md | 8 +
sdk/core/azure-core-test/README.md | 2 +-
sdk/core/azure-core-test/pom.xml | 9 +-
.../java/com/azure/core/test/TestBase.java | 23 +
.../CHANGELOG.md | 10 +-
.../README.md | 2 +-
.../azure-core-tracing-opentelemetry/pom.xml | 7 +-
sdk/core/azure-core/CHANGELOG.md | 25 +-
sdk/core/azure-core/README.md | 2 +-
sdk/core/azure-core/pom.xml | 35 +-
.../com/azure/core/annotation/ReturnType.java | 11 +
.../annotation/ServiceClientProtocol.java | 9 +-
.../credential/AzureNamedKeyCredential.java | 7 +-
.../core/credential/TokenRequestContext.java | 21 +
.../exception/UnexpectedLengthException.java | 11 +
.../java/com/azure/core/http/HttpHeaders.java | 2 +-
.../azure/core/http/HttpPipelineBuilder.java | 15 +-
.../com/azure/core/http/HttpResponse.java | 5 +
.../core/http/policy/RequestIdPolicy.java | 6 +-
.../azure/core/http/policy/RetryStrategy.java | 3 +
.../com/azure/core/http/rest/PagedFlux.java | 127 +-
.../azure/core/http/rest/PagedFluxBase.java | 114 +-
.../azure/core/http/rest/PagedIterable.java | 34 +-
.../core/http/rest/PagedIterableBase.java | 36 +-
.../azure/core/http/rest/RequestOptions.java | 63 +-
.../com/azure/core/http/rest/RestProxy.java | 10 +-
.../com/azure/core/implementation/Option.java | 32 +-
.../com/azure/core/models/CloudEvent.java | 102 +-
.../azure/core/models/JsonPatchDocument.java | 212 +-
.../com/azure/core/util/AsyncCloseable.java | 18 +-
.../java/com/azure/core/util/BinaryData.java | 679 ++-
.../com/azure/core/util/ClientOptions.java | 14 +-
.../com/azure/core/util/Configuration.java | 2 +-
.../java/com/azure/core/util/Context.java | 88 +-
.../java/com/azure/core/util/CoreUtils.java | 2 +
.../java/com/azure/core/util/FluxUtil.java | 16 +-
.../com/azure/core/util/IterableStream.java | 39 +-
.../com/azure/core/util/UserAgentUtil.java | 4 +
.../azure/core/util/logging/ClientLogger.java | 74 +-
.../util/paging/ContinuablePagedFluxCore.java | 97 +-
.../azure/core/util/polling/PollResponse.java | 40 +-
.../azure/core/util/polling/PollerFlux.java | 133 +-
.../core/util/serializer/TypeReference.java | 17 +-
.../com/azure/core/util/tracing/Tracer.java | 136 +-
sdk/core/pom.xml | 8 +-
sdk/core/tests.yml | 4 +
sdk/cosmos/azure-cosmos-encryption/pom.xml | 2 +-
.../azure-cosmos-spark_3-1_2-12/CHANGELOG.md | 2 +-
.../azure-cosmos-spark_3-1_2-12/pom.xml | 6 +-
sdk/cosmos/azure-cosmos/pom.xml | 26 +-
.../RntbdClientChannelHealthChecker.java | 8 +-
.../DedicatedGatewayRequestOptions.java | 4 +-
.../src/main/java/module-info.java | 1 -
.../data/cosmos/core/CosmosTemplateIT.java | 50 +-
.../cosmos/core/ReactiveCosmosTemplateIT.java | 49 +-
sdk/cosmos/azure-spring-data-cosmos/README.md | 18 +
sdk/cosmos/azure-spring-data-cosmos/pom.xml | 16 +-
.../data/cosmos/config/CosmosConfig.java | 35 +-
.../config/DatabaseThroughputConfig.java | 34 +
.../data/cosmos/core/CosmosTemplate.java | 20 +-
.../cosmos/core/ReactiveCosmosTemplate.java | 20 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-databox/pom.xml | 4 +-
.../azure-resourcemanager-databoxedge/pom.xml | 4 +-
.../azure-resourcemanager-databricks/pom.xml | 4 +-
.../azure-resourcemanager-datadog/pom.xml | 4 +-
.../azure-resourcemanager-datafactory/pom.xml | 6 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 6 +-
.../azure-iot-deviceupdate/pom.xml | 6 +-
.../azure-resourcemanager-devspaces/pom.xml | 4 +-
.../azure-resourcemanager-devtestlabs/pom.xml | 4 +-
.../azure-digitaltwins-core/pom.xml | 14 +-
.../pom.xml | 6 +-
sdk/e2e/pom.xml | 4 +-
.../azure-resourcemanager-elastic/pom.xml | 4 +-
.../azure-messaging-eventgrid/CHANGELOG.md | 15 +-
.../azure-messaging-eventgrid/pom.xml | 10 +-
.../messaging/eventgrid/SystemEventNames.java | 107 +-
.../SystemEventMappingNames.java | 95 +-
.../AcsUserDisconnectedEventData.java | 39 +
.../ApiManagementApiCreatedEventData.java | 44 +
.../ApiManagementApiDeletedEventData.java | 44 +
...iManagementApiReleaseCreatedEventData.java | 44 +
...iManagementApiReleaseDeletedEventData.java | 44 +
...iManagementApiReleaseUpdatedEventData.java | 44 +
.../ApiManagementApiUpdatedEventData.java | 44 +
.../ApiManagementProductCreatedEventData.java | 44 +
.../ApiManagementProductDeletedEventData.java | 44 +
.../ApiManagementProductUpdatedEventData.java | 44 +
...anagementSubscriptionCreatedEventData.java | 44 +
...anagementSubscriptionDeletedEventData.java | 44 +
...anagementSubscriptionUpdatedEventData.java | 44 +
.../ApiManagementUserCreatedEventData.java | 44 +
.../ApiManagementUserDeletedEventData.java | 44 +
.../ApiManagementUserUpdatedEventData.java | 44 +
...EventChannelArchiveHeartbeatEventData.java | 45 +
...ncomingVideoStreamsOutOfSyncEventData.java | 2 +-
...ediaLiveEventIngestHeartbeatEventData.java | 62 +-
.../swagger/README.md | 37 +-
.../azure-resourcemanager-eventgrid/pom.xml | 6 +-
.../microsoft-azure-eventgrid/pom.xml | 2 +-
.../CHANGELOG.md | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 4 +-
.../azure-messaging-eventhubs/pom.xml | 6 +-
.../EventHubConsumerAsyncClient.java | 33 +-
.../microsoft-azure-eventhubs-eph/pom.xml | 2 +-
.../pom.xml | 4 +-
.../azure-ai-formrecognizer-perf/pom.xml | 2 +-
.../com/azure/ai/formrecognizer/perf/App.java | 4 +-
...st.java => DocumentModelAnalysisTest.java} | 31 +-
.../formrecognizer/perf/core/ServiceTest.java | 48 +-
.../azure-ai-formrecognizer/CHANGELOG.md | 15 +-
.../azure-ai-formrecognizer/README.md | 616 +--
.../migration-guide.md | 591 +++
.../azure-ai-formrecognizer/pom.xml | 12 +-
.../DocumentAnalysisAsyncClient.java | 327 ++
.../DocumentAnalysisClient.java | 160 +
...ava => DocumentAnalysisClientBuilder.java} | 145 +-
...va => DocumentAnalysisServiceVersion.java} | 13 +-
.../FormRecognizerAsyncClient.java | 1287 -----
.../formrecognizer/FormRecognizerClient.java | 695 ---
.../azure/ai/formrecognizer/Transforms.java | 630 ---
...ocumentModelAdministrationAsyncClient.java | 800 ++++
.../DocumentModelAdministrationClient.java | 467 ++
...mentModelAdministrationClientBuilder.java} | 141 +-
.../models/AccountProperties.java | 64 +
.../models/BuildModelOptions.java | 61 +
.../models/CopyAuthorization.java | 193 +
.../models/CopyAuthorizationOptions.java | 34 +
.../models/CreateComposedModelOptions.java | 35 +
.../administration/models/DocTypeInfo.java | 101 +
.../models/DocumentFieldSchema.java | 163 +
.../administration/models/DocumentModel.java | 109 +
.../models/DocumentModelInfo.java | 104 +
.../models/FormRecognizerError.java | 162 +
.../administration/models/InnerError.java | 102 +
.../administration/models/ModelOperation.java | 220 +
.../models/ModelOperationInfo.java | 218 +
.../models/ModelOperationKind.java | 35 +
.../models/ModelOperationStatus.java | 50 +
.../administration/models/package-info.java | 8 +
.../administration/package-info.java | 10 +
.../implementation/CustomFormModelHelper.java | 50 -
.../CustomFormModelInfoHelper.java | 43 -
.../CustomFormModelPropertiesHelper.java | 35 -
.../CustomFormSubmodelHelper.java | 35 -
.../implementation/FormLineHelper.java | 36 -
.../implementation/FormPageHelper.java | 38 -
.../FormRecognizerClientImpl.java | 4238 ++++-------------
.../FormRecognizerClientImplBuilder.java | 7 +-
.../FormSelectionMarkHelper.java | 41 -
.../implementation/FormTableHelper.java | 36 -
.../implementation/RecognizedFormHelper.java | 40 -
.../implementation/TextAppearanceHelper.java | 41 -
.../TrainingDocumentInfoHelper.java | 35 -
.../implementation/Utility.java | 307 --
.../AnalyzeBusinessCardAsyncHeaders.java | 38 -
.../AnalyzeBusinessCardAsyncResponse.java | 30 -
...aders.java => AnalyzeDocumentHeaders.java} | 8 +-
.../models/AnalyzeDocumentRequest.java | 65 +
...onse.java => AnalyzeDocumentResponse.java} | 12 +-
.../models/AnalyzeIdDocumentAsyncHeaders.java | 38 -
.../AnalyzeIdDocumentAsyncResponse.java | 30 -
.../models/AnalyzeReceiptAsyncResponse.java | 30 -
.../implementation/models/AnalyzeResult.java | 243 +-
...esult.java => AnalyzeResultOperation.java} | 56 +-
.../models/AnalyzeResultOperationStatus.java | 53 +
.../models/AnalyzeWithCustomModelHeaders.java | 38 -
.../AnalyzeWithCustomModelResponse.java | 30 -
.../implementation/models/ApiVersion.java | 31 +
.../implementation/models/Appearance.java | 38 -
.../implementation/models/Attributes.java | 38 -
.../models/AuthorizeCopyRequest.java | 64 +
.../models/AzureBlobContentSource.java | 64 +
.../models/Base64ContentSource.java | 43 +
.../implementation/models/BoundingRegion.java | 65 +
...rs.java => BuildDocumentModelHeaders.java} | 8 +-
.../models/BuildDocumentModelRequest.java | 90 +
...e.java => BuildDocumentModelResponse.java} | 12 +-
.../models/ComponentModelInfo.java | 38 +
.../ComposeCustomModelsAsyncHeaders.java | 38 -
....java => ComposeDocumentModelHeaders.java} | 8 +-
.../models/ComposeDocumentModelRequest.java | 91 +
...cumentModelRequestComponentModelsItem.java | 38 +
...java => ComposeDocumentModelResponse.java} | 12 +-
.../implementation/models/ComposeRequest.java | 66 -
.../implementation/models/ContentSource.java | 28 +
.../models/ContentSourceKind.java | 40 +
.../implementation/models/ContentType.java | 3 +
.../models/CopyAuthorization.java | 170 +
.../models/CopyAuthorizationResult.java | 93 -
...s.java => CopyDocumentModelToHeaders.java} | 8 +-
....java => CopyDocumentModelToResponse.java} | 12 +-
.../models/CopyOperationResult.java | 117 -
.../implementation/models/CopyRequest.java | 99 -
.../implementation/models/CopyResult.java | 66 -
.../models/CustomDocumentModelsInfo.java | 64 +
.../implementation/models/DataTable.java | 117 -
.../implementation/models/DataTableCell.java | 276 --
.../implementation/models/DocTypeInfo.java | 92 +
.../implementation/models/Document.java | 144 +
.../implementation/models/DocumentEntity.java | 169 +
.../{FieldValue.java => DocumentField.java} | 283 +-
.../models/DocumentFieldSchema.java | 143 +
.../models/DocumentFieldType.java | 61 +
.../models/DocumentKeyValueElement.java | 92 +
.../models/DocumentKeyValuePair.java | 90 +
.../implementation/models/DocumentLine.java | 91 +
.../models/DocumentModelBuildTechnique.java | 31 +
.../implementation/models/DocumentPage.java | 254 +
.../implementation/models/DocumentResult.java | 145 -
...onMark.java => DocumentSelectionMark.java} | 83 +-
.../models/DocumentSignatureType.java | 34 +
.../implementation/models/DocumentSpan.java | 64 +
.../implementation/models/DocumentStyle.java | 92 +
.../implementation/models/DocumentTable.java | 143 +
.../models/DocumentTableCell.java | 221 +
.../models/DocumentTableCellKind.java | 43 +
.../implementation/models/DocumentWord.java | 120 +
.../implementation/models/Enum0.java | 42 -
.../implementation/models/Error.java | 143 +
.../models/ErrorInformation.java | 64 -
.../implementation/models/ErrorResponse.java | 14 +-
.../models/FieldTypeSchema.java | 143 +
.../models/FieldTypeSchemaType.java | 64 +
.../models/FieldValueSelectionMark.java | 34 -
.../implementation/models/FieldValueType.java | 71 -
.../models/FormFieldsReport.java | 64 -
...GenerateModelCopyAuthorizationHeaders.java | 38 -
...enerateModelCopyAuthorizationResponse.java | 37 -
.../models/GetInfoResponse.java | 38 +
.../GetInfoResponseCustomDocumentModels.java | 64 +
.../models/GetModelsResponse.java | 65 +
.../models/GetOperationResponse.java | 64 +
.../models/GetOperationsResponse.java | 65 +
.../implementation/models/InnerError.java | 90 +
.../models/KeyValueElement.java | 120 -
.../implementation/models/KeyValuePair.java | 116 -
.../implementation/models/KeyValueType.java | 34 -
.../implementation/models/KeysResult.java | 40 -
.../implementation/models/Language.java | 247 -
.../implementation/models/LengthUnit.java | 34 +
.../models/LocalContentSource.java | 42 +
.../implementation/models/Locale.java | 43 -
.../implementation/models/Model.java | 117 -
.../implementation/models/ModelInfo.java | 159 +-
.../implementation/models/ModelStatus.java | 50 -
.../implementation/models/ModelSummary.java | 91 +
.../implementation/models/Models.java | 91 -
.../implementation/models/ModelsModel.java | 93 -
.../implementation/models/ModelsSummary.java | 91 -
.../implementation/models/OperationInfo.java | 195 +
.../models/OperationInfoKind.java | 37 +
.../implementation/models/OperationKind.java | 37 +
.../models/OperationStatus.java | 7 +-
.../implementation/models/PageResult.java | 117 -
.../implementation/models/ReadResult.java | 216 -
.../implementation/models/ReadingOrder.java | 47 -
.../implementation/models/SourcePath.java | 38 -
.../models/StringIndexType.java | 37 +
.../implementation/models/Style.java | 64 -
.../implementation/models/TextLine.java | 117 -
.../implementation/models/TextStyle.java | 34 -
.../implementation/models/TextWord.java | 91 -
.../models/TrainCustomModelAsyncHeaders.java | 38 -
.../models/TrainCustomModelAsyncResponse.java | 30 -
.../implementation/models/TrainRequest.java | 116 -
.../implementation/models/TrainResult.java | 148 -
.../models/TrainSourceFilter.java | 71 -
.../implementation/models/TrainStatus.java | 50 -
.../models/TrainingDocumentInfo.java | 117 -
.../models/WebContentSource.java | 42 +
.../implementation/models/package-info.java | 4 +-
.../implementation/package-info.java | 4 +-
.../util/AccountPropertiesHelper.java | 41 +
.../util/AnalyzeResultHelper.java | 78 +
.../util/AnalyzedDocumentHelper.java | 62 +
.../util/BoundingRegionHelper.java | 43 +
.../implementation/{ => util}/Constants.java | 14 +-
.../util/CopyAuthorizationHelper.java | 69 +
.../util/DocTypeInfoHelper.java | 49 +
.../util/DocumentAnalysisExceptionHelper.java | 37 +
.../util/DocumentEntityHelper.java | 65 +
.../util/DocumentFieldHelper.java | 136 +
.../util/DocumentFieldSchemaHelper.java | 59 +
.../util/DocumentKeyValueElementHelper.java | 57 +
.../util/DocumentKeyValuePairHelper.java | 53 +
.../util/DocumentLineHelper.java | 49 +
.../util/DocumentModelHelper.java | 60 +
.../util/DocumentModelInfoHelper.java | 48 +
.../util/DocumentOperationResultHelper.java | 36 +
.../util/DocumentPageHelper.java | 83 +
.../util/DocumentSelectionMarkHelper.java | 56 +
.../util/DocumentSpanHelper.java | 41 +
.../util/DocumentStyleHelper.java | 51 +
.../util/DocumentTableCellHelper.java | 82 +
.../util/DocumentTableHelper.java | 65 +
.../util/DocumentWordHelper.java | 55 +
.../util/FormRecognizerErrorHelper.java | 62 +
.../implementation/util/InnerErrorHelper.java | 46 +
.../util/ModelOperationHelper.java | 104 +
.../util/ModelOperationInfoHelper.java | 78 +
.../implementation/util/Transforms.java | 600 +++
.../implementation/util/Utility.java | 177 +
.../models/AnalyzeDocumentOptions.java | 64 +
.../formrecognizer/models/AnalyzeResult.java | 251 +
.../models/AnalyzedDocument.java | 163 +
.../formrecognizer/models/BoundingRegion.java | 75 +
.../models/CreateComposedModelOptions.java | 35 -
.../models/DocumentAnalysisException.java | 39 +
.../formrecognizer/models/DocumentEntity.java | 192 +
.../formrecognizer/models/DocumentField.java | 492 ++
.../models/DocumentFieldType.java | 59 +
.../models/DocumentKeyValueElement.java | 106 +
.../models/DocumentKeyValuePair.java | 102 +
.../formrecognizer/models/DocumentLine.java | 104 +
.../models/DocumentOperationResult.java | 41 +
.../formrecognizer/models/DocumentPage.java | 285 ++
.../models/DocumentSelectionMark.java | 134 +
.../models/DocumentSignatureType.java | 32 +
.../formrecognizer/models/DocumentSpan.java | 73 +
.../formrecognizer/models/DocumentStyle.java | 105 +
.../formrecognizer/models/DocumentTable.java | 162 +
.../models/DocumentTableCell.java | 249 +
.../models/DocumentTableCellKind.java | 41 +
.../formrecognizer/models/DocumentWord.java | 134 +
.../models/FieldBoundingBox.java | 55 -
.../ai/formrecognizer/models/FieldData.java | 69 -
.../ai/formrecognizer/models/FieldValue.java | 240 -
.../formrecognizer/models/FieldValueType.java | 37 -
.../models/FormContentType.java | 49 -
.../ai/formrecognizer/models/FormElement.java | 68 -
.../ai/formrecognizer/models/FormField.java | 82 -
.../ai/formrecognizer/models/FormLine.java | 103 -
.../ai/formrecognizer/models/FormPage.java | 180 -
.../formrecognizer/models/FormPageRange.java | 53 -
.../models/FormReadingOrder.java | 35 -
.../models/FormRecognizerError.java | 53 -
.../FormRecognizerErrorInformation.java | 52 -
.../models/FormRecognizerException.java | 57 -
.../models/FormRecognizerLanguage.java | 243 -
.../models/FormRecognizerLocale.java | 37 -
.../models/FormRecognizerOperationResult.java | 38 -
.../models/FormSelectionMark.java | 103 -
.../ai/formrecognizer/models/FormTable.java | 121 -
.../formrecognizer/models/FormTableCell.java | 185 -
.../ai/formrecognizer/models/FormWord.java | 64 -
.../ai/formrecognizer/models/LengthUnit.java | 47 +-
.../azure/ai/formrecognizer/models/Point.java | 52 -
.../models/RecognizeBusinessCardsOptions.java | 111 -
.../models/RecognizeContentOptions.java | 139 -
.../models/RecognizeCustomFormsOptions.java | 113 -
.../RecognizeIdentityDocumentOptions.java | 86 -
.../models/RecognizeInvoicesOptions.java | 109 -
.../models/RecognizeReceiptsOptions.java | 136 -
.../formrecognizer/models/RecognizedForm.java | 150 -
.../models/SelectionMarkState.java | 26 +-
.../formrecognizer/models/TextAppearance.java | 77 -
.../formrecognizer/models/TextStyleName.java | 37 -
.../formrecognizer/models/package-info.java | 4 +-
.../azure/ai/formrecognizer/package-info.java | 5 +-
.../training/CustomModelTransforms.java | 257 -
.../training/FormTrainingAsyncClient.java | 792 ---
.../training/FormTrainingClient.java | 407 --
.../training/models/AccountProperties.java | 53 -
.../training/models/CopyAuthorization.java | 166 -
.../training/models/CustomFormModel.java | 218 -
.../training/models/CustomFormModelField.java | 68 -
.../training/models/CustomFormModelInfo.java | 144 -
.../models/CustomFormModelProperties.java | 43 -
.../models/CustomFormModelStatus.java | 60 -
.../training/models/CustomFormSubmodel.java | 107 -
.../training/models/TrainingDocumentInfo.java | 120 -
.../training/models/TrainingFileFilter.java | 72 -
.../training/models/TrainingOptions.java | 86 -
.../training/models/TrainingStatus.java | 61 -
.../training/models/package-info.java | 8 -
.../formrecognizer/training/package-info.java | 7 -
.../src/main/java/module-info.java | 8 +-
.../src/samples/README.md | 122 +-
.../AdvancedDiffLabeledUnlabeledData.java | 138 -
...AdvancedDiffLabeledUnlabeledDataAsync.java | 185 -
...nessCard.java => AnalyzeBusinessCard.java} | 154 +-
...ync.java => AnalyzeBusinessCardAsync.java} | 178 +-
...l.java => AnalyzeBusinessCardFromUrl.java} | 141 +-
...a => AnalyzeBusinessCardFromUrlAsync.java} | 164 +-
.../AnalyzeCustomDocumentAsync.java | 116 +
.../AnalyzeCustomDocumentFromUrl.java | 80 +
...nts.java => AnalyzeIdentityDocuments.java} | 82 +-
...ava => AnalyzeIdentityDocumentsAsync.java} | 87 +-
...a => AnalyzeIdentityDocumentsFromUrl.java} | 82 +-
...AnalyzeIdentityDocumentsFromUrlAsync.java} | 84 +-
...nizeInvoices.java => AnalyzeInvoices.java} | 102 +-
...esAsync.java => AnalyzeInvoicesAsync.java} | 109 +-
...omUrl.java => AnalyzeInvoicesFromUrl.java} | 104 +-
....java => AnalyzeInvoicesFromUrlAsync.java} | 137 +-
.../ai/formrecognizer/AnalyzeLayout.java | 91 +
.../ai/formrecognizer/AnalyzeLayoutAsync.java | 120 +
.../formrecognizer/AnalyzeLayoutFromUrl.java | 81 +
.../AnalyzeLayoutFromUrlAsync.java | 109 +
...nizeReceipts.java => AnalyzeReceipts.java} | 81 +-
...tsAsync.java => AnalyzeReceiptsAsync.java} | 89 +-
...omUrl.java => AnalyzeReceiptsFromUrl.java} | 93 +-
....java => AnalyzeReceiptsFromUrlAsync.java} | 85 +-
.../ai/formrecognizer/Authentication.java | 128 +-
.../azure/ai/formrecognizer/CopyModel.java | 63 -
.../formrecognizer/CreateComposedModel.java | 97 -
.../CreateComposedModelAsync.java | 104 -
...nalysisAsyncClientJavaDocCodeSnippets.java | 172 +
...mentAnalysisClientJavaDocCodeSnippets.java | 151 +
...ognizerAsyncClientJavaDocCodeSnippets.java | 1252 -----
...rmRecognizerClientJavaDocCodeSnippets.java | 1195 -----
...rainingAsyncClientJavaDocCodeSnippets.java | 351 --
...FormTrainingClientJavaDocCodeSnippets.java | 339 --
.../ai/formrecognizer/GetBoundingBoxes.java | 92 -
.../formrecognizer/GetBoundingBoxesAsync.java | 109 -
.../ai/formrecognizer/ManageCustomModels.java | 73 -
.../ManageCustomModelsAsync.java | 78 -
.../ai/formrecognizer/ReadmeSamples.java | 496 +-
.../com/azure/ai/formrecognizer/Receipt.java | 480 --
.../ai/formrecognizer/RecognizeContent.java | 92 -
.../formrecognizer/RecognizeContentAsync.java | 119 -
.../RecognizeContentFromUrl.java | 81 -
.../RecognizeContentFromUrlAsync.java | 104 -
.../RecognizeCustomFormsAsync.java | 88 -
...izeCustomFormsAsyncWithSelectionMarks.java | 128 -
.../RecognizeCustomFormsFromUrl.java | 52 -
.../StronglyTypedRecognizedForm.java | 88 -
.../formrecognizer/TrainModelWithLabels.java | 86 -
.../TrainModelWithLabelsAsync.java | 107 -
.../TrainModelWithoutLabels.java | 85 -
.../TrainModelWithoutLabelsAsync.java | 106 -
.../administration/BuildModel.java | 65 +
.../administration/BuildModelAsync.java | 82 +
.../administration/CopyModel.java | 55 +
.../{ => administration}/CopyModelAsync.java | 45 +-
.../administration/CreateComposedModel.java | 77 +
.../CreateComposedModelAsync.java | 87 +
...elAdminAsyncClientJavaDocCodeSnippets.java | 395 ++
...ntModelAdminClientJavaDocCodeSnippets.java | 423 ++
.../administration/GetOperationInfo.java | 47 +
.../administration/GetOperationInfoAsync.java | 47 +
.../administration/ManageCustomModels.java | 65 +
.../ManageCustomModelsAsync.java | 72 +
.../administration/package-info.java | 8 +
.../azure/ai/formrecognizer/package-info.java | 2 +-
.../ContentTypeDetectionTest.java | 108 -
.../CopyAuthorizationSerializerTest.java | 56 -
.../DocumentAnalysisAsyncClientTest.java | 1190 +++++
.../DocumentAnalysisClientTest.java | 1486 ++++++
.../DocumentAnalysisClientTestBase.java | 750 +++
.../FieldValueExtensionMethodTest.java | 301 --
.../FormRecognizerAsyncClientTest.java | 2324 ---------
.../FormRecognizerClientBuilderTest.java | 269 --
.../FormRecognizerClientBuilderUnitTest.java | 82 -
.../FormRecognizerClientTest.java | 2363 ---------
.../FormRecognizerClientTestBase.java | 1232 -----
.../FormTrainingAsyncClientTest.java | 824 ----
.../FormTrainingClientBuilderTest.java | 258 -
.../FormTrainingClientBuilderUnitTest.java | 141 -
.../FormTrainingClientTest.java | 765 ---
.../FormTrainingClientTestBase.java | 318 --
.../azure/ai/formrecognizer/TestUtils.java | 202 +-
...entModelAdministrationAsyncClientTest.java | 319 ++
...DocumentModelAdministrationClientTest.java | 398 ++
...mentModelAdministrationClientTestBase.java | 114 +
...t.analyzeBusinessCardDataNullData[1].json} | 0
...nalyzeBusinessCardDataWithBlankPdf[1].json | 64 +
...rdDataWithContentTypeAutoDetection[1].json | 64 +
...analyzeBusinessCardDataWithPngFile[1].json | 64 +
...ClientTest.analyzeBusinessCardData[1].json | 64 +
....analyzeBusinessCardFromDamagedPdf[1].json | 25 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...nalyzeBusinessCardInvalidSourceUrl[1].json | 25 +
...zeBusinessCardSourceUrlWithPngFile[1].json | 64 +
...tTest.analyzeBusinessCardSourceUrl[1].json | 64 +
...tTest.analyzeContentFromDamagedPdf[1].json | 25 +
...st.analyzeContentFromDataMultiPage[1].json | 64 +
...est.analyzeContentFromUrlMultiPage[1].json | 64 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...tTest.analyzeContentFromUrlWithPdf[1].json | 64 +
...ncClientTest.analyzeContentFromUrl[1].json | 64 +
...est.analyzeContentInvalidSourceUrl[1].json | 25 +
...t.analyzeContentResultWithBlankPdf[1].json | 64 +
...ResultWithContentTypeAutoDetection[1].json | 64 +
....analyzeContentResultWithNullData[1].json} | 0
...ntTest.analyzeContentWithPageRange[1].json | 64 +
...cClientTest.analyzeContentWithPage[1].json | 64 +
...ClientTest.analyzeContentWithPages[1].json | 64 +
...zeContentWithSelectionMarksFromUrl[1].json | 64 +
...t.analyzeContentWithSelectionMarks[1].json | 64 +
...ysisAsyncClientTest.analyzeContent[1].json | 64 +
...ntTest.analyzeGermanContentFromUrl[1].json | 64 +
...est.analyzeIDDocumentDataNullData[1].json} | 0
...st.analyzeIDDocumentFromDamagedPdf[1].json | 25 +
....analyzeIDDocumentInvalidSourceUrl[1].json | 25 +
...Test.analyzeIDDocumentWithBlankPdf[1].json | 64 +
...est.analyzeInvoiceDataWithBlankPdf[1].json | 64 +
...ceDataWithContentTypeAutoDetection[1].json | 64 +
...AsyncClientTest.analyzeInvoiceData[1].json | 64 +
...tTest.analyzeInvoiceFromDamagedPdf[1].json | 25 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...est.analyzeInvoiceInvalidSourceUrl[1].json | 25 +
...ClientTest.analyzeInvoiceSourceUrl[1].json | 64 +
...cClientTest.analyzeInvoiceWithPage[1].json | 64 +
...cClientTest.analyzeLicenseCardData[1].json | 64 +
...seDataWithContentTypeAutoDetection[1].json | 64 +
...ClientTest.analyzeLicenseSourceUrl[1].json | 64 +
...st.analyzeMultipageBusinessCardUrl[1].json | 64 +
...tTest.analyzeMultipageBusinessCard[1].json | 64 +
...ClientTest.analyzeMultipageInvoice[1].json | 64 +
...ntTest.analyzeReceiptDataNullData[1].json} | 0
...est.analyzeReceiptDataWithBlankPdf[1].json | 64 +
...ptDataWithContentTypeAutoDetection[1].json | 64 +
...Test.analyzeReceiptDataWithPngFile[1].json | 64 +
...AsyncClientTest.analyzeReceiptData[1].json | 64 +
...tTest.analyzeReceiptFromDamagedPdf[1].json | 25 +
...st.analyzeReceiptFromDataMultiPage[1].json | 84 +
...est.analyzeReceiptFromUrlMultiPage[1].json | 64 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...est.analyzeReceiptInvalidSourceUrl[1].json | 25 +
...analyzeReceiptSourceUrlWithPngFile[1].json | 64 +
...ClientTest.analyzeReceiptSourceUrl[1].json | 64 +
...yncClientTest.businessCardWithPage[1].json | 64 +
...AsyncClientTest.invoiceValidLocale[1].json | 84 +
...sisAsyncClientTest.receiptWithPage[1].json | 64 +
...t.analyzeBusinessCardDataNullData[1].json} | 0
...nalyzeBusinessCardDataWithBlankPdf[1].json | 88 +
...rdDataWithContentTypeAutoDetection[1].json | 64 +
...analyzeBusinessCardDataWithPngFile[1].json | 64 +
...ClientTest.analyzeBusinessCardData[1].json | 64 +
....analyzeBusinessCardFromDamagedPdf[1].json | 25 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...nalyzeBusinessCardInvalidSourceUrl[1].json | 25 +
...zeBusinessCardSourceUrlWithPngFile[1].json | 64 +
...tTest.analyzeBusinessCardSourceUrl[1].json | 64 +
...tTest.analyzeContentFromDamagedPdf[1].json | 25 +
...st.analyzeContentFromDataMultiPage[1].json | 64 +
...est.analyzeContentFromUrlMultiPage[1].json | 64 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...tTest.analyzeContentFromUrlWithPdf[1].json | 64 +
...isClientTest.analyzeContentFromUrl[1].json | 64 +
...est.analyzeContentInvalidSourceUrl[1].json | 25 +
...t.analyzeContentResultWithBlankPdf[1].json | 64 +
...ResultWithContentTypeAutoDetection[1].json | 64 +
....analyzeContentResultWithNullData[1].json} | 0
...ntTest.analyzeContentWithPageRange[1].json | 64 +
...sClientTest.analyzeContentWithPage[1].json | 64 +
...ClientTest.analyzeContentWithPages[1].json | 64 +
...zeContentWithSelectionMarksFromUrl[1].json | 100 +
...t.analyzeContentWithSelectionMarks[1].json | 64 +
...tAnalysisClientTest.analyzeContent[1].json | 64 +
...Test.analyzeCustomDocumentBlankPdf[1].json | 124 +
...st.analyzeCustomDocumentDamagedPdf[1].json | 44 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...lyzeCustomDocumentInvalidSourceUrl[1].json | 115 +
...analyzeCustomDocumentInvalidStatus[1].json | 85 +
...est.analyzeCustomDocumentMultiPage[1].json | 44 +
....analyzeCustomDocumentUrlMultiPage[1].json | 142 +
...zeCustomDocumentUrlNonExistModelId[1].json | 25 +
...CustomDocumentUrlWithSelectionMark[1].json | 25 +
...lientTest.analyzeCustomDocumentUrl[1].json | 142 +
...cumentWithContentTypeAutoDetection[1].json | 124 +
...lyzeCustomDocumentWithEmptyModelId[1].json | 24 +
....analyzeCustomDocumentWithNullData[1].json | 64 +
...lyzeCustomDocumentWithNullModelId[1].json} | 0
...yzeCustomDocumentWithSelectionMark[1].json | 25 +
...isClientTest.analyzeCustomDocument[1].json | 44 +
...ntTest.analyzeGermanContentFromUrl[1].json | 64 +
...est.analyzeIDDocumentDataNullData[1].json} | 0
...st.analyzeIDDocumentFromDamagedPdf[1].json | 25 +
....analyzeIDDocumentInvalidSourceUrl[1].json | 25 +
...Test.analyzeIDDocumentWithBlankPdf[1].json | 64 +
...est.analyzeInvoiceDataWithBlankPdf[1].json | 64 +
...ceDataWithContentTypeAutoDetection[1].json | 64 +
...lysisClientTest.analyzeInvoiceData[1].json | 64 +
...tTest.analyzeInvoiceFromDamagedPdf[1].json | 25 +
...InvoiceFromUrlIncludeFieldElements[1].json | 64 +
...est.analyzeInvoiceInvalidSourceUrl[1].json | 25 +
...ClientTest.analyzeInvoiceSourceUrl[1].json | 64 +
...lientTest.analyzeJpgCustomDocument[1].json | 124 +
...sClientTest.analyzeLicenseCardData[1].json | 64 +
...seDataWithContentTypeAutoDetection[1].json | 64 +
...ClientTest.analyzeLicenseSourceUrl[1].json | 64 +
...st.analyzeMultipageBusinessCardUrl[1].json | 100 +
...tTest.analyzeMultipageBusinessCard[1].json | 64 +
...ClientTest.analyzeMultipageInvoice[1].json | 64 +
...ntTest.analyzeReceiptDataNullData[1].json} | 0
...est.analyzeReceiptDataWithBlankPdf[1].json | 64 +
...ptDataWithContentTypeAutoDetection[1].json | 64 +
...Test.analyzeReceiptDataWithPngFile[1].json | 64 +
...lysisClientTest.analyzeReceiptData[1].json | 64 +
...tTest.analyzeReceiptFromDamagedPdf[1].json | 25 +
...st.analyzeReceiptFromDataMultiPage[1].json | 64 +
...est.analyzeReceiptFromUrlMultiPage[1].json | 64 +
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 +
...est.analyzeReceiptInvalidSourceUrl[1].json | 25 +
...analyzeReceiptSourceUrlWithPngFile[1].json | 64 +
...ClientTest.analyzeReceiptSourceUrl[1].json | 64 +
...eDocTypeComposedModelWithModelName[1].json | 25 +
...t.checkCustomDocumentComposedModel[1].json | 124 +
...t.checkCustomDocumentWithModelName[1].json | 25 +
...ClientTest.invoiceSubLineItemsNull[1].json | 64 +
...lysisClientTest.invoiceValidLocale[1].json | 64 +
...Test.recognizeGermanContentFromUrl[1].json | 64 +
...ionAsyncClientTest.beginBuildModel[1].json | 102 +
...istrationAsyncClientTest.beginCopy[1].json | 181 +
...nAsyncClientTest.copyAuthorization[1].json | 43 +
...eleteModelValidModelIdWithResponse[1].json | 44 +
...tDocumentAnalysisClientAndValidate[1].json | 64 +
...yncClientTest.getModelNullModelId[1].json} | 0
...yncClientTest.getModelWithResponse[1].json | 64 +
...strationAsyncClientTest.listModels[1].json | 24 +
...tionAsyncClientTest.listOperations[1].json | 64 +
...idGetAccountPropertiesWithResponse[1].json | 24 +
...ientTest.validGetAccountProperties[1].json | 24 +
...udeSubfolderWithNonExistPrefixName[1].json | 25 +
...odelIncludeSubfolderWithPrefixName[1].json | 25 +
...ientTest.beginBuildModelNullInput[1].json} | 0
....beginBuildModelWithJPGTrainingSet[1].json | 44 +
...ldModelWithMultiPagePDFTrainingSet[1].json | 44 +
...AdministrationClientTest.beginCopy[1].json | 44 +
...lientTest.beginCreateComposedModel[1].json | 164 +
...rationClientTest.copyAuthorization[1].json | 25 +
...Test.deleteModelNonExistingModelID[1].json | 24 +
...eleteModelValidModelIDWithResponse[1].json | 102 +
...tDocumentAnalysisClientAndValidate[1].json | 64 +
...entTest.getModelNonExistingModelID[1].json | 24 +
...ionClientTest.getModelNullModelID[1].json} | 0
...ionClientTest.getModelWithResponse[1].json | 102 +
...onClientTest.listModelsWithContext[1].json | 24 +
...dministrationClientTest.listModels[1].json | 24 +
...idGetAccountPropertiesWithResponse[1].json | 24 +
...ientTest.validGetAccountProperties[1].json | 24 +
...ClientTest.businessCardValidLocale[1].json | 64 -
...yncClientTest.businessCardWithPage[1].json | 64 -
...AsyncClientTest.invoiceValidLocale[1].json | 84 -
...AsyncClientTest.receiptValidLocale[1].json | 84 -
...zerAsyncClientTest.receiptWithPage[1].json | 64 -
...sinessCardDataIncludeFieldElements[1].json | 104 -
...ognizeBusinessCardDataWithBlankPdf[1].json | 64 -
...rdDataWithContentTypeAutoDetection[1].json | 64 -
...cognizeBusinessCardDataWithPngFile[1].json | 64 -
...ientTest.recognizeBusinessCardData[1].json | 84 -
...ecognizeBusinessCardFromDamagedPdf[1].json | 25 -
...essCardFromUrlIncludeFieldElements[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...ognizeBusinessCardInvalidSourceUrl[1].json | 25 -
...zeBusinessCardSourceUrlWithPngFile[1].json | 64 -
...est.recognizeBusinessCardSourceUrl[1].json | 64 -
...entTest.recognizeContentAppearance[1].json | 64 -
...est.recognizeContentFromDamagedPdf[1].json | 25 -
....recognizeContentFromDataMultiPage[1].json | 64 -
...t.recognizeContentFromUrlMultiPage[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...est.recognizeContentFromUrlWithPdf[1].json | 64 -
...ClientTest.recognizeContentFromUrl[1].json | 64 -
...izeContentIncorrectLanguageFromUrl[1].json | 25 -
...t.recognizeContentInvalidSourceUrl[1].json | 25 -
...recognizeContentResultWithBlankPdf[1].json | 64 -
...ResultWithContentTypeAutoDetection[1].json | 64 -
...Test.recognizeContentWithPageRange[1].json | 64 -
...lientTest.recognizeContentWithPage[1].json | 64 -
...ientTest.recognizeContentWithPages[1].json | 64 -
...nizeContentWithReadingOrderNatural[1].json | 84 -
...t.recognizeContentWithReadingOrder[1].json | 84 -
...zeContentWithSelectionMarksFromUrl[1].json | 64 -
...recognizeContentWithSelectionMarks[1].json | 64 -
...erAsyncClientTest.recognizeContent[1].json | 64 -
...Test.recognizeCustomFormDamagedPdf[1].json | 125 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 -
...ecognizeCustomFormInvalidSourceUrl[1].json | 85 -
...t.recognizeCustomFormInvalidStatus[1].json | 86 -
...ormLabeledDataExcludeFieldElements[1].json | 124 -
...LabeledDataWithBlankPdfContentType[1].json | 124 -
...edDataWithContentTypeAutoDetection[1].json | 124 -
...mFormLabeledDataWithJpgContentType[1].json | 144 -
...tomFormLabeledDataWithNullFormData[1].json | 64 -
...omFormLabeledDataWithSelectionMark[1].json | 124 -
...est.recognizeCustomFormLabeledData[1].json | 144 -
...ecognizeCustomFormMultiPageLabeled[1].json | 124 -
...ognizeCustomFormMultiPageUnlabeled[1].json | 524 --
...mUnlabeledDataIncludeFieldElements[1].json | 184 -
...labeledDataWithBlankPdfContentType[1].json | 184 -
...ormUnlabeledDataWithJpgContentType[1].json | 204 -
...t.recognizeCustomFormUnlabeledData[1].json | 204 -
...UrlLabeledDataIncludeFieldElements[1].json | 124 -
...eCustomFormUrlLabeledDataWithPages[1].json | 164 -
...ormUrlLabeledDataWithSelectionMark[1].json | 144 -
....recognizeCustomFormUrlLabeledData[1].json | 144 -
...gnizeCustomFormUrlMultiPageLabeled[1].json | 144 -
...izeCustomFormUrlMultiPageUnlabeled[1].json | 244 -
...ognizeCustomFormUrlNonExistModelId[1].json | 25 -
...lUnlabeledDataIncludeFieldElements[1].json | 184 -
...ecognizeCustomFormUrlUnlabeledData[1].json | 204 -
...Test.recognizeGermanContentFromUrl[1].json | 64 -
....recognizeIDDocumentFromDamagedPdf[1].json | 25 -
...ocumentFromUrlIncludeFieldElements[1].json | 64 -
...ecognizeIDDocumentInvalidSourceUrl[1].json | 25 -
...st.recognizeIDDocumentWithBlankPdf[1].json | 64 -
...izeInvoiceDataIncludeFieldElements[1].json | 64 -
...t.recognizeInvoiceDataWithBlankPdf[1].json | 64 -
...ceDataWithContentTypeAutoDetection[1].json | 64 -
...yncClientTest.recognizeInvoiceData[1].json | 64 -
...est.recognizeInvoiceFromDamagedPdf[1].json | 25 -
...InvoiceFromUrlIncludeFieldElements[1].json | 84 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...t.recognizeInvoiceInvalidSourceUrl[1].json | 25 -
...ientTest.recognizeInvoiceSourceUrl[1].json | 64 -
...lientTest.recognizeInvoiceWithPage[1].json | 64 -
...lientTest.recognizeLicenseCardData[1].json | 84 -
...izeLicenseDataIncludeFieldElements[1].json | 64 -
...seDataWithContentTypeAutoDetection[1].json | 64 -
...ientTest.recognizeLicenseSourceUrl[1].json | 84 -
....recognizeMultipageBusinessCardUrl[1].json | 104 -
...est.recognizeMultipageBusinessCard[1].json | 64 -
...ientTest.recognizeMultipageInvoice[1].json | 64 -
...izeReceiptDataIncludeFieldElements[1].json | 64 -
...t.recognizeReceiptDataWithBlankPdf[1].json | 64 -
...ptDataWithContentTypeAutoDetection[1].json | 64 -
...st.recognizeReceiptDataWithPngFile[1].json | 84 -
...yncClientTest.recognizeReceiptData[1].json | 64 -
...est.recognizeReceiptFromDamagedPdf[1].json | 25 -
....recognizeReceiptFromDataMultiPage[1].json | 84 -
...ReceiptFromUrlIncludeFieldElements[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...t.recognizeReceiptInvalidSourceUrl[1].json | 25 -
...cognizeReceiptSourceUrlWithPngFile[1].json | 64 -
...ientTest.recognizeReceiptSourceUrl[1].json | 64 -
...t.clientBuilderWithDefaultPipeline[1].json | 64 -
...BuilderWithInvalidApiKeyCredential[1].json | 22 -
...t.clientBuilderWithInvalidEndpoint[1].json | 56 -
...lientBuilderWithNullServiceVersion[1].json | 84 -
...lientBuilderWithRotateToInvalidKey[1].json | 22 -
....clientBuilderWithRotateToValidKey[1].json | 64 -
...FormTypeComposedModelWithModelName[1].json | 298 --
...heckRecognizeFormTypeComposedModel[1].json | 298 --
...ognizeFormTypeLabeledWithModelName[1].json | 142 -
...heckRecognizedFormTypeLabeledModel[1].json | 142 -
...ormTypeUnlabeledModelWithModelName[1].json | 222 -
...ckRecognizedFormTypeUnlabeledModel[1].json | 202 -
...ClientTest.invoiceSubLineItemsNull[1].json | 64 -
...nizerClientTest.invoiceValidLocale[1].json | 64 -
...nizerClientTest.receiptValidLocale[1].json | 64 -
...sinessCardDataIncludeFieldElements[1].json | 64 -
...ognizeBusinessCardDataWithBlankPdf[1].json | 64 -
...rdDataWithContentTypeAutoDetection[1].json | 64 -
...cognizeBusinessCardDataWithPngFile[1].json | 64 -
...ientTest.recognizeBusinessCardData[1].json | 64 -
...ecognizeBusinessCardFromDamagedPdf[1].json | 25 -
...essCardFromUrlIncludeFieldElements[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...ognizeBusinessCardInvalidSourceUrl[1].json | 25 -
...zeBusinessCardSourceUrlWithPngFile[1].json | 64 -
...est.recognizeBusinessCardSourceUrl[1].json | 64 -
...entTest.recognizeContentAppearance[1].json | 64 -
...est.recognizeContentFromDamagedPdf[1].json | 25 -
....recognizeContentFromDataMultiPage[1].json | 64 -
...t.recognizeContentFromUrlMultiPage[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...est.recognizeContentFromUrlWithPdf[1].json | 64 -
...ClientTest.recognizeContentFromUrl[1].json | 64 -
...izeContentIncorrectLanguageFromUrl[1].json | 25 -
...t.recognizeContentInvalidSourceUrl[1].json | 25 -
...recognizeContentResultWithBlankPdf[1].json | 64 -
...ResultWithContentTypeAutoDetection[1].json | 64 -
...Test.recognizeContentWithPageRange[1].json | 84 -
...lientTest.recognizeContentWithPage[1].json | 64 -
...ientTest.recognizeContentWithPages[1].json | 64 -
...zeContentWithSelectionMarksFromUrl[1].json | 64 -
...recognizeContentWithSelectionMarks[1].json | 64 -
...ognizerClientTest.recognizeContent[1].json | 64 -
...Test.recognizeCustomFormDamagedPdf[1].json | 125 -
...mFromUrlLabeledDataWithNullModelId[1].json | 4 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 25 -
...ecognizeCustomFormInvalidSourceUrl[1].json | 85 -
...t.recognizeCustomFormInvalidStatus[1].json | 86 -
...ormLabeledDataExcludeFieldElements[1].json | 144 -
...LabeledDataWithBlankPdfContentType[1].json | 124 -
...edDataWithContentTypeAutoDetection[1].json | 144 -
...tomFormLabeledDataWithEmptyModelId[1].json | 4 -
...mFormLabeledDataWithJpgContentType[1].json | 124 -
...tomFormLabeledDataWithNullFormData[1].json | 64 -
...stomFormLabeledDataWithNullModelId[1].json | 4 -
...omFormLabeledDataWithSelectionMark[1].json | 124 -
...est.recognizeCustomFormLabeledData[1].json | 144 -
...ecognizeCustomFormMultiPageLabeled[1].json | 124 -
...ognizeCustomFormMultiPageUnlabeled[1].json | 224 -
...mUnlabeledDataIncludeFieldElements[1].json | 204 -
...labeledDataWithBlankPdfContentType[1].json | 184 -
...ormUnlabeledDataWithJpgContentType[1].json | 224 -
...t.recognizeCustomFormUnlabeledData[1].json | 184 -
...UrlLabeledDataIncludeFieldElements[1].json | 144 -
...ormUrlLabeledDataWithSelectionMark[1].json | 144 -
....recognizeCustomFormUrlLabeledData[1].json | 124 -
...gnizeCustomFormUrlMultiPageLabeled[1].json | 144 -
...izeCustomFormUrlMultiPageUnlabeled[1].json | 224 -
...ognizeCustomFormUrlNonExistModelId[1].json | 25 -
...lUnlabeledDataIncludeFieldElements[1].json | 204 -
...ecognizeCustomFormUrlUnlabeledData[1].json | 184 -
...Test.recognizeGermanContentFromUrl[1].json | 64 -
...st.recognizeIDDocumentDataNullData[1].json | 4 -
....recognizeIDDocumentFromDamagedPdf[1].json | 25 -
...ocumentFromUrlIncludeFieldElements[1].json | 64 -
...ecognizeIDDocumentInvalidSourceUrl[1].json | 25 -
...st.recognizeIDDocumentWithBlankPdf[1].json | 64 -
...izeInvoiceDataIncludeFieldElements[1].json | 64 -
...t.recognizeInvoiceDataWithBlankPdf[1].json | 64 -
...ceDataWithContentTypeAutoDetection[1].json | 64 -
...zerClientTest.recognizeInvoiceData[1].json | 84 -
...est.recognizeInvoiceFromDamagedPdf[1].json | 25 -
...InvoiceFromUrlIncludeFieldElements[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...t.recognizeInvoiceInvalidSourceUrl[1].json | 25 -
...ientTest.recognizeInvoiceSourceUrl[1].json | 64 -
...lientTest.recognizeLicenseCardData[1].json | 64 -
...izeLicenseDataIncludeFieldElements[1].json | 64 -
...seDataWithContentTypeAutoDetection[1].json | 64 -
...ientTest.recognizeLicenseSourceUrl[1].json | 64 -
....recognizeMultipageBusinessCardUrl[1].json | 64 -
...est.recognizeMultipageBusinessCard[1].json | 64 -
...ientTest.recognizeMultipageInvoice[1].json | 64 -
...izeReceiptDataIncludeFieldElements[1].json | 84 -
...tTest.recognizeReceiptDataNullData[1].json | 4 -
...t.recognizeReceiptDataWithBlankPdf[1].json | 64 -
...ptDataWithContentTypeAutoDetection[1].json | 64 -
...st.recognizeReceiptDataWithPngFile[1].json | 84 -
...zerClientTest.recognizeReceiptData[1].json | 64 -
...est.recognizeReceiptFromDamagedPdf[1].json | 25 -
....recognizeReceiptFromDataMultiPage[1].json | 84 -
...ReceiptFromUrlIncludeFieldElements[1].json | 64 -
...mUrlWithEncodedBlankSpaceSourceUrl[1].json | 56 -
...t.recognizeReceiptInvalidSourceUrl[1].json | 25 -
...cognizeReceiptSourceUrlWithPngFile[1].json | 64 -
...ientTest.recognizeReceiptSourceUrl[1].json | 64 -
...lientTest.beginCopyIncorrectRegion[1].json | 166 -
...cClientTest.beginCopyInvalidRegion[1].json | 146 -
...mTrainingAsyncClientTest.beginCopy[1].json | 205 -
...beginCreateComposedDuplicateModels[1].json | 103 -
...eginCreateComposedModelWithOptions[1].json | 238 -
...lientTest.beginCreateComposedModel[1].json | 238 -
....beginCreateComposedUnlabeledModel[1].json | 261 -
...Test.beginTrainingLabeledModelName[1].json | 84 -
...cClientTest.beginTrainingNullInput[1].json | 4 -
...st.beginTrainingUnlabeledModelName[1].json | 124 -
...ithTrainingLabelsForJPGTrainingSet[1].json | 64 -
...ngLabelsForMultiPagePDFTrainingSet[1].json | 64 -
...udeSubfolderWithNonExistPrefixName[1].json | 45 -
...belsExcludeSubfolderWithPrefixName[1].json | 84 -
...outTrainingLabelsForJPGTrainingSet[1].json | 144 -
...ngLabelsForMultiPagePDFTrainingSet[1].json | 124 -
...udeSubfolderWithNonExistPrefixName[1].json | 45 -
...belsIncludeSubfolderWithPrefixName[1].json | 84 -
...gAsyncClientTest.copyAuthorization[1].json | 25 -
...ientTest.deleteModelInvalidModelId[1].json | 4 -
...dWithResponseWithoutTrainingLabels[1].json | 142 -
...eleteModelValidModelIdWithResponse[1].json | 102 -
...tTest.getCustomModelInvalidModelId[1].json | 4 -
...ncClientTest.getCustomModelLabeled[1].json | 64 -
...ientTest.getCustomModelNullModelId[1].json | 4 -
...ClientTest.getCustomModelUnlabeled[1].json | 124 -
...entTest.getCustomModelWithResponse[1].json | 124 -
...getFormRecognizerClientAndValidate[1].json | 64 -
...idGetAccountPropertiesWithResponse[1].json | 24 -
...ientTest.validGetAccountProperties[1].json | 24 -
...ainingClientBuilderDefaultPipeline[1].json | 64 -
...ainingClientBuilderInvalidEndpoint[1].json | 56 -
...gClientBuilderInvalidKeyCredential[1].json | 21 -
...ingClientBuilderNullServiceVersion[1].json | 64 -
...ingClientBuilderRotateToInvalidKey[1].json | 21 -
...iningClientBuilderRotateToValidKey[1].json | 64 -
...lientTest.beginCopyIncorrectRegion[1].json | 186 -
...gClientTest.beginCopyInvalidRegion[1].json | 146 -
.../FormTrainingClientTest.beginCopy[1].json | 205 -
...beginCreateComposedDuplicateModels[1].json | 103 -
...eginCreateComposedModelWithOptions[1].json | 238 -
...lientTest.beginCreateComposedModel[1].json | 258 -
....beginCreateComposedUnlabeledModel[1].json | 301 --
...ginTrainingLabeledModelDisplayName[1].json | 84 -
...gClientTest.beginTrainingNullInput[1].json | 4 -
...ithTrainingLabelsForJPGTrainingSet[1].json | 64 -
...ngLabelsForMultiPagePDFTrainingSet[1].json | 64 -
...udeSubfolderWithNonExistPrefixName[1].json | 45 -
...belsExcludeSubfolderWithPrefixName[1].json | 104 -
...outTrainingLabelsForJPGTrainingSet[1].json | 104 -
...ngLabelsForMultiPagePDFTrainingSet[1].json | 144 -
...udeSubfolderWithNonExistPrefixName[1].json | 45 -
...belsIncludeSubfolderWithPrefixName[1].json | 124 -
...ainingClientTest.copyAuthorization[1].json | 25 -
...ientTest.deleteModelInvalidModelId[1].json | 4 -
...dWithResponseWithoutTrainingLabels[1].json | 162 -
...eleteModelValidModelIdWithResponse[1].json | 102 -
...tTest.getCustomModelInvalidModelId[1].json | 4 -
...ngClientTest.getCustomModelLabeled[1].json | 104 -
...ientTest.getCustomModelNullModelId[1].json | 4 -
...ClientTest.getCustomModelUnlabeled[1].json | 124 -
...entTest.getCustomModelWithResponse[1].json | 144 -
...getFormRecognizerClientAndValidate[1].json | 64 -
...idGetAccountPropertiesWithResponse[1].json | 24 -
...ientTest.validGetAccountProperties[1].json | 24 -
.../azure-ai-formrecognizer/swagger/FR-v3.yml | 1684 +++++++
.../azure-ai-formrecognizer/swagger/README.md | 24 +-
sdk/formrecognizer/ci.yml | 64 +-
sdk/formrecognizer/pom.xml | 2 +-
sdk/formrecognizer/test-resources.json | 370 +-
sdk/formrecognizer/tests.yml | 38 +-
.../azure-resourcemanager-frontdoor/pom.xml | 6 +-
.../azure-resourcemanager-hanaonazure/pom.xml | 4 +-
.../azure-resourcemanager-hdinsight/pom.xml | 6 +-
.../azure-resourcemanager-healthbot/pom.xml | 2 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
sdk/identity/azure-identity/pom.xml | 13 +-
.../azure/identity/CredentialBuilderBase.java | 2 +-
.../implementation/util/IdentityUtil.java | 9 +-
.../src/main/java/module-info.java | 1 -
.../identity/util/IdentityUtilTests.java | 6 +-
.../pom.xml | 6 +-
.../azure-resourcemanager-iotcentral/pom.xml | 4 +-
.../azure-resourcemanager-iothub/pom.xml | 6 +-
.../pom.xml | 10 +-
.../KeyVaultAccessControlAsyncClient.java | 20 +-
.../KeyVaultCredentialPolicy.java | 209 +-
.../implementation/ScopeTokenCache.java | 60 -
.../KeyVaultAccessControlAsyncClientTest.java | 142 +-
.../KeyVaultAccessControlClientTest.java | 190 +-
.../KeyVaultAccessControlClientTestBase.java | 31 +-
.../KeyVaultBackupAsyncClientTest.java | 54 +-
.../KeyVaultBackupClientTest.java | 12 +-
.../KeyVaultBackupClientTestBase.java | 2 +-
...createExistingRoleAssignmentThrows[1].json | 44 +-
...yncClientTest.createRoleAssignment[1].json | 38 +-
...ExistingRoleAssignmentDoesNotThrow[1].json | 34 +-
...ExistingRoleDefinitionDoesNotThrow[1].json | 12 +-
...yncClientTest.deleteRoleAssignment[1].json | 50 +-
...yncClientTest.deleteRoleDefinition[1].json | 28 +-
...lAsyncClientTest.getRoleAssignment[1].json | 50 +-
...lAsyncClientTest.getRoleDefinition[1].json | 30 +-
...syncClientTest.listRoleAssignments[1].json | 14 +-
...syncClientTest.listRoleDefinitions[1].json | 16 +-
...lAsyncClientTest.setRoleDefinition[1].json | 16 +-
...createExistingRoleAssignmentThrows[1].json | 44 +-
...rolClientTest.createRoleAssignment[1].json | 38 +-
...ExistingRoleAssignmentDoesNotThrow[1].json | 36 +-
...ExistingRoleDefinitionDoesNotThrow[1].json | 10 +-
...rolClientTest.deleteRoleAssignment[1].json | 50 +-
...rolClientTest.deleteRoleDefinition[1].json | 26 +-
...ontrolClientTest.getRoleAssignment[1].json | 52 +-
...ontrolClientTest.getRoleDefinition[1].json | 30 +-
...trolClientTest.listRoleAssignments[1].json | 28 +-
...trolClientTest.listRoleDefinitions[1].json | 28 +-
...ontrolClientTest.setRoleDefinition[1].json | 16 +-
...tBackupAsyncClientTest.beginBackup[1].json | 78 +-
...BackupAsyncClientTest.beginRestore[1].json | 224 +-
...lientTest.beginSelectiveKeyRestore[1].json | 190 +-
...yVaultBackupClientTest.beginBackup[1].json | 78 +-
...VaultBackupClientTest.beginRestore[1].json | 222 +-
...lientTest.beginSelectiveKeyRestore[1].json | 214 +-
.../pom.xml | 10 +-
.../certificates/CertificateAsyncClient.java | 1 -
.../KeyVaultCredentialPolicy.java | 194 +-
.../implementation/ScopeTokenCache.java | 61 -
.../certificates/CertificateClientTest.java | 5 +-
.../CertificateClientTestBase.java | 20 +-
.../azure-security-keyvault-jca/pom.xml | 6 +-
.../keyvault/jca/KeyVaultKeyStore.java | 16 +-
.../jca/KeyVaultCertificatesTest.java | 2 +-
.../keyvault/jca/KeyVaultKeyStoreTest.java | 76 +-
.../jca/KeyVaultKeyStoreUnitTest.java | 95 +
.../azure-security-keyvault-keys/pom.xml | 10 +-
.../keyvault/keys/KeyAsyncClient.java | 1303 +++--
.../security/keyvault/keys/KeyClient.java | 1205 +++--
.../keyvault/keys/KeyClientBuilder.java | 9 +-
.../security/keyvault/keys/KeyService.java | 33 +
.../cryptography/CryptographyAsyncClient.java | 2 -
.../KeyVaultCredentialPolicy.java | 192 +-
.../keys/implementation/ScopeTokenCache.java | 61 -
.../models/KeyRotationPolicy.java | 77 +
.../models/KeyRotationPolicyAttributes.java | 66 +
.../implementation/models/LifetimeAction.java | 63 +
.../models/LifetimeActionTrigger.java | 67 +
.../models/LifetimeActionsType.java | 39 +
.../models/KeyRotationLifetimeAction.java | 82 +
.../keys/models/KeyRotationPolicy.java | 95 +
.../keys/models/KeyRotationPolicyAction.java | 49 +
.../models/KeyRotationPolicyProperties.java | 74 +
.../KeyAsyncClientJavaDocCodeSnippets.java | 672 +--
.../keys/KeyClientJavaDocCodeSnippets.java | 637 ++-
.../keys/KeyAsyncClientManagedHsmTest.java | 34 +-
.../keyvault/keys/KeyAsyncClientTest.java | 122 +-
.../keys/KeyClientManagedHsmTest.java | 33 +-
.../security/keyvault/keys/KeyClientTest.java | 118 +-
.../keyvault/keys/KeyClientTestBase.java | 210 +-
.../CryptographyClientManagedHsmTest.java | 5 +-
.../cryptography/CryptographyClientTest.java | 8 +-
.../CryptographyClientTestBase.java | 15 +-
.../KeyEncryptionKeyClientManagedHsmTest.java | 102 +
.../KeyEncryptionKeyClientTest.java | 25 +-
.../KeyEncryptionKeyClientTestBase.java | 15 +-
...graphyClientTest.encryptDecryptRsa[1].json | 50 +-
...est.createRsaKeyWithPublicExponent[1].json | 6 +-
...cClientManagedHsmTest.createRsaKey[1].json | 30 +
...yncClientManagedHsmTest.releaseKey[1].json | 52 +
...est.createRsaKeyWithPublicExponent[1].json | 30 +
...tKeyRotationPolicyOfNonExistentKey[1].json | 29 +
...etKeyRotationPolicyWithNoPolicySet[1].json | 55 +
.../KeyAsyncClientTest.releaseKey[1].json | 4 +-
.../KeyAsyncClientTest.rotateKey[1].json | 55 +
...KeyRotationPolicyWithAllProperties[1].json | 81 +
...otationPolicyWithMinimumProperties[1].json | 81 +
...est.createRsaKeyWithPublicExponent[1].json | 6 +-
...yClientManagedHsmTest.createRsaKey[1].json | 30 +
...KeyClientManagedHsmTest.releaseKey[1].json | 52 +
...est.createRsaKeyWithPublicExponent[1].json | 30 +
...tKeyRotationPolicyOfNonExistentKey[1].json | 29 +
...etKeyRotationPolicyWithNoPolicySet[1].json | 55 +
.../KeyClientTest.releaseKey[1].json | 10 +-
.../KeyClientTest.rotateKey[1].json | 55 +
...KeyRotationPolicyWithAllProperties[1].json | 81 +
...otationPolicyWithMinimumProperties[1].json | 81 +
...edHsmTest.wrapUnwrapSymmetricAK128[1].json | 126 +
...edHsmTest.wrapUnwrapSymmetricAK192[1].json | 126 +
...lientTest.wrapUnwrapSymmetricAK128[1].json | 30 +-
...lientTest.wrapUnwrapSymmetricAK192[1].json | 30 +-
.../azure-security-keyvault-perf/pom.xml | 2 +-
.../azure-security-keyvault-secrets/pom.xml | 10 +-
.../keyvault/secrets/SecretAsyncClient.java | 1 -
.../KeyVaultCredentialPolicy.java | 207 +-
.../implementation/ScopeTokenCache.java | 60 -
.../secrets/SecretAsyncClientTest.java | 2 +-
.../keyvault/secrets/SecretClientTest.java | 2 +-
.../secrets/SecretClientTestBase.java | 8 +-
.../azure-security-test-keyvault-jca/pom.xml | 4 +-
.../pom.xml | 2 +-
.../microsoft-azure-keyvault-webkey/pom.xml | 6 +-
sdk/keyvault/platform-matrix.json | 6 -
sdk/keyvault/regenerate_and_fix_sdk.py | 4 +-
.../pom.xml | 4 +-
sdk/kusto/azure-resourcemanager-kusto/pom.xml | 4 +-
.../azure-resourcemanager-labservices/pom.xml | 4 +-
.../pom.xml | 4 +-
.../microsoft-azure-loganalytics/pom.xml | 4 +-
sdk/logic/azure-resourcemanager-logic/pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-maintenance/pom.xml | 6 +-
.../pom.xml | 4 +-
sdk/maps/azure-resourcemanager-maps/pom.xml | 6 +-
.../azure-resourcemanager-mariadb/pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../microsoft-azure-media/pom.xml | 8 +-
.../azure-ai-metricsadvisor/pom.xml | 8 +-
.../azure-mixedreality-authentication/pom.xml | 10 +-
.../pom.xml | 4 +-
.../azure-iot-modelsrepository/pom.xml | 10 +-
.../pom.xml | 8 +-
sdk/monitor/azure-monitor-query/pom.xml | 8 +-
sdk/mysql/azure-resourcemanager-mysql/pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-netapp/pom.xml | 6 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
sdk/parents/azure-client-sdk-parent/pom.xml | 72 +-
sdk/parents/azure-data-sdk-parent/pom.xml | 10 +-
.../azure-resourcemanager-peering/pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-postgresql/pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-analytics-purview-catalog/pom.xml | 10 +-
.../azure-analytics-purview-scanning/pom.xml | 10 +-
.../azure-resourcemanager-purview/pom.xml | 4 +-
sdk/quantum/azure-quantum-jobs/pom.xml | 6 +-
sdk/quota/azure-resourcemanager-quota/pom.xml | 4 +-
.../pom.xml | 2 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
sdk/relay/azure-resourcemanager-relay/pom.xml | 2 +-
.../pom.xml | 8 +-
.../pom.xml | 6 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-appplatform/pom.xml | 2 +-
.../azure-resourcemanager-appservice/pom.xml | 2 +-
.../appservice/models/DeployOptions.java | 2 +-
.../pom.xml | 2 +-
.../azure-resourcemanager-cdn/pom.xml | 2 +-
.../azure-resourcemanager-compute/pom.xml | 2 +-
.../pom.xml | 2 +-
.../implementation/ContainerGroupImpl.java | 5 +-
.../containerinstance/ContainerGroupTest.java | 2 +-
....testContainerGroupWithVirtualNetwork.json | 582 +--
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../azure-resourcemanager-cosmos/pom.xml | 2 +-
.../azure-resourcemanager-dns/pom.xml | 2 +-
.../azure-resourcemanager-eventhubs/pom.xml | 2 +-
.../azure-resourcemanager-keyvault/pom.xml | 2 +-
.../azure-resourcemanager-monitor/pom.xml | 2 +-
.../azure-resourcemanager-msi/pom.xml | 2 +-
.../azure-resourcemanager-network/pom.xml | 2 +-
.../azure-resourcemanager-privatedns/pom.xml | 2 +-
.../azure-resourcemanager-redis/pom.xml | 2 +-
.../CHANGELOG.md | 2 +
.../azure-resourcemanager-resources/pom.xml | 8 +-
.../implementation/GenericResourcesImpl.java | 23 +-
.../resources/models/GenericResources.java | 33 +-
.../resources/GenericResourcesTests.java | 54 +
...sourcesTests.canValidateMoveResources.json | 824 ++++
.../azure-resourcemanager-samples/pom.xml | 2 +-
.../azure-resourcemanager-search/pom.xml | 2 +-
.../azure-resourcemanager-servicebus/pom.xml | 2 +-
.../azure-resourcemanager-sql/pom.xml | 2 +-
.../azure-resourcemanager-storage/pom.xml | 2 +-
.../azure-resourcemanager-test/pom.xml | 8 +-
.../pom.xml | 2 +-
.../azure-resourcemanager/pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-data-schemaregistry-avro/pom.xml | 4 +-
.../azure-data-schemaregistry/pom.xml | 8 +-
.../SchemaRegistryAsyncClient.java | 84 +-
.../SchemaRegistryClientBuilder.java | 36 +-
.../SchemaRegistryAsyncClientTests.java | 29 -
.../SchemaRegistryClientTests.java | 23 -
...lientTests.registerAndGetCachedSchema.json | 29 -
...lientTests.registerAndGetCachedSchema.json | 29 -
sdk/search/azure-search-documents/pom.xml | 10 +-
.../azure-resourcemanager-security/pom.xml | 4 +-
.../azure-messaging-servicebus/pom.xml | 10 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-signalr/pom.xml | 4 +-
.../pom.xml | 2 +-
.../pom.xml | 10 +-
.../azure-spring-boot-starter-cosmos/pom.xml | 2 +-
.../CHANGELOG.md | 1 +
.../README.md | 2 +-
...tCertificatesEnvironmentPostProcessor.java | 1 +
.../pom.xml | 2 +-
.../pom.xml | 30 +-
.../azure-spring-boot-starter-storage/pom.xml | 2 +-
sdk/spring/azure-spring-boot-starter/pom.xml | 2 +-
.../azure-spring-boot-test-parent/pom.xml | 2 +-
sdk/spring/azure-spring-boot/pom.xml | 4 +-
.../azure-spring-cloud-autoconfigure/pom.xml | 4 +-
.../azure-spring-cloud-starter-cache/pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 2 +-
.../pom.xml | 4 +-
.../azure-spring-cloud-test-eventhubs/pom.xml | 4 +-
.../azure-spring-cloud-test-parent/pom.xml | 2 +-
.../pom.xml | 7 +-
.../azure-spring-integration-test/pom.xml | 4 +-
.../pom.xml | 2 +-
.../azure-storage-blob-batch/README.md | 33 +
sdk/storage/azure-storage-blob-batch/pom.xml | 162 +-
.../azure/storage/blob/batch/APISpec.groovy | 12 +-
.../storage/blob/batch/BatchAPITest.groovy | 10 +-
.../azure-storage-blob-changefeed/pom.xml | 162 +-
.../storage/blob/changefeed/APISpec.groovy | 10 +-
.../changefeed/ChangefeedNetworkTest.groovy | 3 +-
.../azure-storage-blob-cryptography/README.md | 34 +
.../azure-storage-blob-cryptography/pom.xml | 161 +-
.../EncryptedBlobClientBuilder.java | 2 +-
.../specialized/cryptography/APISpec.groovy | 4 +-
.../BlobCryptographyBuilderTest.groovy | 18 +-
.../EncryptedBlobOutputStreamTest.groovy | 6 +-
.../EncyptedBlockBlobAPITest.groovy | 71 +-
.../cryptography/KeyvaultKeyTest.groovy | 8 +-
.../cryptography/LocalKeyTest.groovy | 4 +-
sdk/storage/azure-storage-blob-nio/pom.xml | 162 +-
.../com/azure/storage/blob/nio/APISpec.groovy | 22 +-
.../blob/nio/AzureDirectoryStreamTest.groovy | 2 +-
.../blob/nio/AzureFileStoreTest.groovy | 6 +-
.../nio/AzureFileSystemProviderTest.groovy | 9 +-
.../blob/nio/AzureFileSystemTest.groovy | 12 +-
.../storage/blob/nio/AzurePathTest.groovy | 4 +-
sdk/storage/azure-storage-blob/CHANGELOG.md | 4 +-
sdk/storage/azure-storage-blob/README.md | 33 +
sdk/storage/azure-storage-blob/pom.xml | 164 +-
.../azure/storage/blob/BlobClientBuilder.java | 2 +-
.../blob/BlobContainerClientBuilder.java | 2 +-
.../storage/blob/BlobServiceAsyncClient.java | 3 +-
.../blob/BlobServiceClientBuilder.java | 2 +-
.../implementation/util/BlobSasImplUtil.java | 96 +-
.../sas/BlobServiceSasSignatureValues.java | 20 +
.../blob/specialized/BlobAsyncClientBase.java | 4 +-
.../SpecializedBlobClientBuilder.java | 2 +-
.../com/azure/storage/blob/APISpec.groovy | 32 +-
.../com/azure/storage/blob/BlobAPITest.groovy | 45 +-
.../storage/blob/BlobOutputStreamTest.groovy | 12 +-
.../blob/BlobServiceSasModelsTest.groovy | 4 +-
.../com/azure/storage/blob/CPKNTest.groovy | 6 +-
.../com/azure/storage/blob/CPKTest.groovy | 8 +-
.../storage/blob/ContainerAPITest.groovy | 10 +-
.../ImmutableStorageWithVersioningTest.groovy | 14 +-
.../storage/blob/OAuthCopySourceTests.groovy | 8 +-
.../storage/blob/ProgressReporterTest.groovy | 3 +-
.../azure/storage/blob/SasClientTests.groovy | 44 +-
.../azure/storage/blob/ServiceAPITest.groovy | 22 +-
.../blob/specialized/AppendBlobAPITest.groovy | 6 +-
.../blob/specialized/BlobBaseAPITest.groovy | 38 +-
.../blob/specialized/BlockBlobAPITest.groovy | 30 +-
.../specialized/DownloadResponseTest.groovy | 10 +-
.../blob/specialized/HelperTest.groovy | 4 +-
.../blob/specialized/PageBlobAPITest.groovy | 8 +-
sdk/storage/azure-storage-common/CHANGELOG.md | 2 +-
sdk/storage/azure-storage-common/README.md | 34 +
sdk/storage/azure-storage-common/pom.xml | 168 +-
.../implementation/AccountSasImplUtil.java | 11 +-
.../common/implementation/Constants.java | 7 +-
.../common/sas/AccountSasSignatureValues.java | 60 +-
.../common/sas/CommonSasQueryParameters.java | 12 +
.../common/test/shared/StorageSpec.groovy | 7 +-
.../common/test/shared/ThreadDumper.java | 2 +-
.../test/shared/extensions/LiveOnly.java | 2 +
.../shared/policy/NoOpHttpPipelinePolicy.java | 23 +
.../implementation/SasModelsTest.groovy | 2 +-
.../azure-storage-file-datalake/CHANGELOG.md | 2 +-
.../azure-storage-file-datalake/README.md | 33 +-
.../azure-storage-file-datalake/pom.xml | 162 +-
.../DataLakeFileSystemClientBuilder.java | 2 +-
.../datalake/DataLakePathClientBuilder.java | 2 +-
.../DataLakeServiceClientBuilder.java | 2 +-
.../util/DataLakeSasImplUtil.java | 85 +-
.../storage/file/datalake/APISpec.groovy | 23 +-
.../datalake/AsyncErrorMappingTest.groovy | 16 +-
.../file/datalake/DirectoryAPITest.groovy | 35 +-
.../storage/file/datalake/FileAPITest.groovy | 85 +-
.../file/datalake/FileSystemAPITest.groovy | 5 +-
.../file/datalake/LargeFileTest.groovy | 4 +-
.../storage/file/datalake/SASTest.groovy | 26 +-
.../file/datalake/ServiceAPITest.groovy | 12 +-
.../file/datalake/SoftDeleteTest.groovy | 8 +-
.../LeaseAsyncErrorMappingTest.groovy | 2 +-
.../azure-storage-file-share/README.md | 34 +
sdk/storage/azure-storage-file-share/pom.xml | 164 +-
.../file/share/ShareServiceAsyncClient.java | 2 +-
.../azure/storage/file/share/APISpec.groovy | 34 +-
.../file/share/DirectoryAPITests.groovy | 6 +-
.../file/share/DirectoryAsyncAPITests.groovy | 2 +-
.../storage/file/share/FileAPITests.groovy | 19 +-
.../file/share/FileAsyncAPITests.groovy | 11 +-
.../storage/file/share/FileSASTests.groovy | 13 +-
.../file/share/FileSasClientTests.groovy | 7 +-
.../file/share/FileServiceAPITests.groovy | 7 +-
.../share/FileServiceAsyncAPITests.groovy | 2 +-
.../file/share/OAuthCopySourceTests.groovy | 6 +-
.../storage/file/share/ShareAPITests.groovy | 11 +-
.../file/share/ShareAsyncAPITests.groovy | 7 +-
.../azure-storage-internal-avro/pom.xml | 160 +-
sdk/storage/azure-storage-queue/README.md | 33 +
sdk/storage/azure-storage-queue/pom.xml | 165 +-
.../storage/queue/QueueClientBuilder.java | 2 +-
.../queue/QueueServiceAsyncClient.java | 2 +-
.../queue/QueueServiceClientBuilder.java | 2 +-
.../com/azure/storage/queue/APISpec.groovy | 12 +-
.../azure/storage/queue/QueueAPITests.groovy | 4 +-
.../storage/queue/QueueAysncAPITests.groovy | 4 +-
.../azure/storage/queue/QueueSASTests.groovy | 14 +-
.../storage/queue/QueueSasClientTests.groovy | 4 +-
sdk/storage/ci.yml | 6 +
.../microsoft-azure-storage-blob/pom.xml | 157 +-
.../microsoft/azure/storage/APISpec.groovy | 14 +-
.../com/microsoft/azure/storage/Samples.java | 3 +-
.../azure/storage/ServiceAPITest.groovy | 3 +-
.../microsoft-azure-storage-blob/tests.yml | 18 -
.../microsoft-azure-storage-perf/pom.xml | 4 +-
sdk/storage/platform-matrix-ci.json | 14 +
sdk/storage/platform-matrix.json | 5 +
sdk/storage/tests-template.yml | 112 +
sdk/storage/tests.yml | 106 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-resourcemanager-support/pom.xml | 4 +-
.../pom.xml | 8 +-
.../azure-analytics-synapse-artifacts/pom.xml | 8 +-
.../pom.xml | 8 +-
.../pom.xml | 8 +-
.../azure-analytics-synapse-spark/pom.xml | 8 +-
.../azure-resourcemanager-synapse/pom.xml | 4 +-
sdk/tables/azure-data-tables-perf/pom.xml | 2 +-
sdk/tables/azure-data-tables/pom.xml | 8 +-
sdk/template/azure-sdk-template/pom.xml | 2 +-
.../azure-ai-textanalytics/pom.xml | 8 +-
.../pom.xml | 4 +-
.../azure-ai-documenttranslator/pom.xml | 10 +-
.../azure-media-videoanalyzer-edge/pom.xml | 4 +-
.../pom.xml | 4 +-
.../pom.xml | 4 +-
.../azure-messaging-webpubsub/pom.xml | 8 +-
.../azure-resourcemanager-webpubsub/pom.xml | 4 +-
1482 files changed, 51003 insertions(+), 63799 deletions(-)
delete mode 100644 eng/bomgenerator/generateAzureSDKBOM.cmd
create mode 100644 eng/bomgenerator/generateAzureSDKBOM.ps1
create mode 100644 eng/guardian-tools/policheck/PolicheckExclusions.xml
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicy.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/RedirectPolicy.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannel.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContent.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormat.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannelType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContentType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java
delete mode 100644 sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormatType.java
create mode 100644 sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicyTests.java
create mode 100644 sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorExecutorTest.java
delete mode 100644 sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/TokenRequestContextExperimental.java
delete mode 100644 sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/package-info.java
create mode 100644 sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/DatabaseThroughputConfig.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java
create mode 100644 sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java
rename sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/{CustomModelRecognitionTest.java => DocumentModelAnalysisTest.java} (59%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/migration-guide.md
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/{FormRecognizerClientBuilder.java => DocumentAnalysisClientBuilder.java} (63%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/{FormRecognizerServiceVersion.java => DocumentAnalysisServiceVersion.java} (62%)
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/Transforms.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationAsyncClient.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClient.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/{training/FormTrainingClientBuilder.java => administration/DocumentModelAdministrationClientBuilder.java} (63%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/AccountProperties.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/BuildModelOptions.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/CopyAuthorization.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/CopyAuthorizationOptions.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/CreateComposedModelOptions.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/DocTypeInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/DocumentFieldSchema.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/DocumentModel.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/DocumentModelInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/FormRecognizerError.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/InnerError.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/ModelOperation.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/ModelOperationInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/ModelOperationKind.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/ModelOperationStatus.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/models/package-info.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/package-info.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/CustomFormModelHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/CustomFormModelInfoHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/CustomFormModelPropertiesHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/CustomFormSubmodelHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormLineHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormPageHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormSelectionMarkHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/FormTableHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/RecognizedFormHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/TextAppearanceHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/TrainingDocumentInfoHelper.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/Utility.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeBusinessCardAsyncHeaders.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeBusinessCardAsyncResponse.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{CopyCustomModelHeaders.java => AnalyzeDocumentHeaders.java} (82%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeDocumentRequest.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{CopyCustomModelResponse.java => AnalyzeDocumentResponse.java} (66%)
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeIdDocumentAsyncHeaders.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeIdDocumentAsyncResponse.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeReceiptAsyncResponse.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeOperationResult.java => AnalyzeResultOperation.java} (64%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeResultOperationStatus.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeWithCustomModelHeaders.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AnalyzeWithCustomModelResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ApiVersion.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Appearance.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Attributes.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AuthorizeCopyRequest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/AzureBlobContentSource.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Base64ContentSource.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/BoundingRegion.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeLayoutAsyncHeaders.java => BuildDocumentModelHeaders.java} (81%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/BuildDocumentModelRequest.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeLayoutAsyncResponse.java => BuildDocumentModelResponse.java} (67%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ComponentModelInfo.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ComposeCustomModelsAsyncHeaders.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeReceiptAsyncHeaders.java => ComposeDocumentModelHeaders.java} (79%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ComposeDocumentModelRequest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ComposeDocumentModelRequestComponentModelsItem.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{ComposeCustomModelsAsyncResponse.java => ComposeDocumentModelResponse.java} (69%)
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ComposeRequest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ContentSource.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ContentSourceKind.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CopyAuthorization.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CopyAuthorizationResult.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeInvoiceAsyncHeaders.java => CopyDocumentModelToHeaders.java} (81%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{AnalyzeInvoiceAsyncResponse.java => CopyDocumentModelToResponse.java} (67%)
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CopyOperationResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CopyRequest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CopyResult.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/CustomDocumentModelsInfo.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DataTable.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DataTableCell.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocTypeInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Document.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentEntity.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{FieldValue.java => DocumentField.java} (52%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentFieldSchema.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentFieldType.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentKeyValueElement.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentKeyValuePair.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentLine.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentModelBuildTechnique.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentPage.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentResult.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/{SelectionMark.java => DocumentSelectionMark.java} (53%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentSignatureType.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentSpan.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentStyle.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentTable.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentTableCell.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentTableCellKind.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/DocumentWord.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Enum0.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Error.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ErrorInformation.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/FieldTypeSchema.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/FieldTypeSchemaType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/FieldValueSelectionMark.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/FieldValueType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/FormFieldsReport.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GenerateModelCopyAuthorizationHeaders.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GenerateModelCopyAuthorizationResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GetInfoResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GetInfoResponseCustomDocumentModels.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GetModelsResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GetOperationResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/GetOperationsResponse.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/InnerError.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/KeyValueElement.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/KeyValuePair.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/KeyValueType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/KeysResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Language.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/LengthUnit.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/LocalContentSource.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Locale.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Model.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ModelStatus.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ModelSummary.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Models.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ModelsModel.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ModelsSummary.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/OperationInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/OperationInfoKind.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/OperationKind.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/PageResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ReadResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/ReadingOrder.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/SourcePath.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/StringIndexType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/Style.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TextLine.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TextStyle.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TextWord.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainCustomModelAsyncHeaders.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainCustomModelAsyncResponse.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainRequest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainSourceFilter.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainStatus.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/TrainingDocumentInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/models/WebContentSource.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/AccountPropertiesHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/AnalyzeResultHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/AnalyzedDocumentHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/BoundingRegionHelper.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/{ => util}/Constants.java (61%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/CopyAuthorizationHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocTypeInfoHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentAnalysisExceptionHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentEntityHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentFieldHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentFieldSchemaHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentKeyValueElementHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentKeyValuePairHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentLineHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentModelHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentModelInfoHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentOperationResultHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentPageHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentSelectionMarkHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentSpanHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentStyleHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentTableCellHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentTableHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/DocumentWordHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/FormRecognizerErrorHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/InnerErrorHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/ModelOperationHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/ModelOperationInfoHelper.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/Transforms.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/implementation/util/Utility.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/AnalyzeDocumentOptions.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/AnalyzeResult.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/AnalyzedDocument.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/BoundingRegion.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/CreateComposedModelOptions.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentAnalysisException.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentEntity.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentField.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentFieldType.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentKeyValueElement.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentKeyValuePair.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentLine.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentOperationResult.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentPage.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentSelectionMark.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentSignatureType.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentSpan.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentStyle.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentTable.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentTableCell.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentTableCellKind.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/DocumentWord.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FieldBoundingBox.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FieldData.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FieldValue.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FieldValueType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormContentType.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormElement.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormField.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormLine.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormPage.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormPageRange.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormReadingOrder.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerError.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerErrorInformation.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerException.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerLanguage.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerLocale.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormRecognizerOperationResult.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormSelectionMark.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormTable.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormTableCell.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/FormWord.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/Point.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeBusinessCardsOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeContentOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeCustomFormsOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeIdentityDocumentOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeInvoicesOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizeReceiptsOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/RecognizedForm.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/TextAppearance.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/models/TextStyleName.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/CustomModelTransforms.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/AccountProperties.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CopyAuthorization.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormModel.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormModelField.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormModelInfo.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormModelProperties.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormModelStatus.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/CustomFormSubmodel.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/TrainingDocumentInfo.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/TrainingFileFilter.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/TrainingOptions.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/TrainingStatus.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/models/package-info.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/package-info.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledDataAsync.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeBusinessCard.java => AnalyzeBusinessCard.java} (50%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeBusinessCardAsync.java => AnalyzeBusinessCardAsync.java} (52%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeBusinessCardFromUrl.java => AnalyzeBusinessCardFromUrl.java} (52%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeBusinessCardFromUrlAsync.java => AnalyzeBusinessCardFromUrlAsync.java} (54%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeCustomDocumentAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeCustomDocumentFromUrl.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeIdentityDocuments.java => AnalyzeIdentityDocuments.java} (51%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeIdentityDocumentsAsync.java => AnalyzeIdentityDocumentsAsync.java} (58%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeIdentityDocumentsFromUrl.java => AnalyzeIdentityDocumentsFromUrl.java} (50%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeIdentityDocumentsFromUrlAsync.java => AnalyzeIdentityDocumentsFromUrlAsync.java} (57%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeInvoices.java => AnalyzeInvoices.java} (59%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeInvoicesAsync.java => AnalyzeInvoicesAsync.java} (63%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeInvoicesFromUrl.java => AnalyzeInvoicesFromUrl.java} (58%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeInvoicesFromUrlAsync.java => AnalyzeInvoicesFromUrlAsync.java} (56%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayout.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayoutAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayoutFromUrl.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayoutFromUrlAsync.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeReceipts.java => AnalyzeReceipts.java} (59%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeReceiptsAsync.java => AnalyzeReceiptsAsync.java} (64%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeReceiptsFromUrl.java => AnalyzeReceiptsFromUrl.java} (58%)
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{RecognizeReceiptsFromUrlAsync.java => AnalyzeReceiptsFromUrlAsync.java} (62%)
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModel.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CreateComposedModel.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CreateComposedModelAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClientJavaDocCodeSnippets.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/DocumentAnalysisClientJavaDocCodeSnippets.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientJavaDocCodeSnippets.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormRecognizerClientJavaDocCodeSnippets.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientJavaDocCodeSnippets.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/FormTrainingClientJavaDocCodeSnippets.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxes.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/GetBoundingBoxesAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/Receipt.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrl.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsyncWithSelectionMarks.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/BuildModel.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/BuildModelAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CopyModel.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/{ => administration}/CopyModelAsync.java (52%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CreateComposedModel.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CreateComposedModelAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/DocumentModelAdminAsyncClientJavaDocCodeSnippets.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/DocumentModelAdminClientJavaDocCodeSnippets.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/GetOperationInfo.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/GetOperationInfoAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/ManageCustomModels.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/ManageCustomModelsAsync.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/package-info.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/ContentTypeDetectionTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/CopyAuthorizationSerializerTest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClientTest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/DocumentAnalysisClientTest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/DocumentAnalysisClientTestBase.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FieldValueExtensionMethodTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClientTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientBuilderTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientBuilderUnitTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormRecognizerClientTestBase.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingAsyncClientTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientBuilderTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientBuilderUnitTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTest.java
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/FormTrainingClientTestBase.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationAsyncClientTest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClientTest.java
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClientTestBase.java
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeBusinessCardDataNullData[1].json => DocumentAnalysisAsyncClientTest.analyzeBusinessCardDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardDataWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardSourceUrlWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeBusinessCardSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromDataMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromUrlMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromUrlWithPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentFromUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentResultWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentResultWithContentTypeAutoDetection[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeContentResultWithNullData[1].json => DocumentAnalysisAsyncClientTest.analyzeContentResultWithNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentWithPageRange[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentWithPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentWithPages[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentWithSelectionMarksFromUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContentWithSelectionMarks[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeContent[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeGermanContentFromUrl[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeCustomFormFromUrlLabeledDataWithEmptyModelId[1].json => DocumentAnalysisAsyncClientTest.analyzeIDDocumentDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeIDDocumentFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeIDDocumentInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeIDDocumentWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeInvoiceWithPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeLicenseCardData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeLicenseDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeLicenseSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeMultipageBusinessCardUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeMultipageBusinessCard[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeMultipageInvoice[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeCustomFormFromUrlLabeledDataWithNullModelId[1].json => DocumentAnalysisAsyncClientTest.analyzeReceiptDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptDataWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptFromDataMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptFromUrlMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptSourceUrlWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.analyzeReceiptSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.businessCardWithPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.invoiceValidLocale[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisAsyncClientTest.receiptWithPage[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithEmptyModelId[1].json => DocumentAnalysisClientTest.analyzeBusinessCardDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardDataWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardSourceUrlWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeBusinessCardSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromDataMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromUrlMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromUrlWithPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentFromUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentResultWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentResultWithContentTypeAutoDetection[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithNullModelId[1].json => DocumentAnalysisClientTest.analyzeContentResultWithNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentWithPageRange[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentWithPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentWithPages[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentWithSelectionMarksFromUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContentWithSelectionMarks[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeContent[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentInvalidStatus[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentUrlMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentUrlNonExistModelId[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentUrlWithSelectionMark[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentWithEmptyModelId[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentWithNullData[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeIDDocumentDataNullData[1].json => DocumentAnalysisClientTest.analyzeCustomDocumentWithNullModelId[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocumentWithSelectionMark[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeCustomDocument[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeGermanContentFromUrl[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerAsyncClientTest.recognizeReceiptDataNullData[1].json => DocumentAnalysisClientTest.analyzeIDDocumentDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeIDDocumentFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeIDDocumentInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeIDDocumentWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceFromUrlIncludeFieldElements[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeInvoiceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeJpgCustomDocument[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeLicenseCardData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeLicenseDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeLicenseSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeMultipageBusinessCardUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeMultipageBusinessCard[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeMultipageInvoice[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerClientBuilderTest.clientBuilderWithHttpEndpoint[1].json => DocumentAnalysisClientTest.analyzeReceiptDataNullData[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptDataWithBlankPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptDataWithContentTypeAutoDetection[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptDataWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptData[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptFromDamagedPdf[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptFromDataMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptFromUrlMultiPage[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptFromUrlWithEncodedBlankSpaceSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptInvalidSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptSourceUrlWithPngFile[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.analyzeReceiptSourceUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.checkAnalyzeDocTypeComposedModelWithModelName[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.checkCustomDocumentComposedModel[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.checkCustomDocumentWithModelName[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.invoiceSubLineItemsNull[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.invoiceValidLocale[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentAnalysisClientTest.recognizeGermanContentFromUrl[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.beginBuildModel[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.beginCopy[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.copyAuthorization[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.deleteModelValidModelIdWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.getDocumentAnalysisClientAndValidate[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerClientTest.recognizeBusinessCardDataNullData[1].json => DocumentModelAdministrationAsyncClientTest.getModelNullModelId[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.getModelWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.listModels[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.listOperations[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.validGetAccountPropertiesWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationAsyncClientTest.validGetAccountProperties[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginBuildModelIncludeSubfolderWithNonExistPrefixName[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginBuildModelIncludeSubfolderWithPrefixName[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerClientTest.recognizeContentResultWithNullData[1].json => DocumentModelAdministrationClientTest.beginBuildModelNullInput[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginBuildModelWithJPGTrainingSet[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginBuildModelWithMultiPagePDFTrainingSet[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginCopy[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.beginCreateComposedModel[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.copyAuthorization[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.deleteModelNonExistingModelID[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.deleteModelValidModelIDWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.getDocumentAnalysisClientAndValidate[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.getModelNonExistingModelID[1].json
rename sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/{FormRecognizerClientTest.recognizeCustomFormFromUrlLabeledDataWithEmptyModelId[1].json => DocumentModelAdministrationClientTest.getModelNullModelID[1].json} (100%)
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.getModelWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.listModelsWithContext[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.listModels[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.validGetAccountPropertiesWithResponse[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/DocumentModelAdministrationClientTest.validGetAccountProperties[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.businessCardValidLocale[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.businessCardWithPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.invoiceValidLocale[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.receiptValidLocale[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.receiptWithPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardDataWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardSourceUrlWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeBusinessCardSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentAppearance[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromDataMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromUrlMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromUrlWithPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentIncorrectLanguageFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentResultWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentResultWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithPageRange[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithPages[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithReadingOrderNatural[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithReadingOrder[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithSelectionMarksFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContentWithSelectionMarks[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeContent[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormInvalidStatus[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataExcludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithBlankPdfContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithJpgContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithNullFormData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledDataWithSelectionMark[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormLabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormMultiPageLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormMultiPageUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUnlabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUnlabeledDataWithBlankPdfContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUnlabeledDataWithJpgContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUnlabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlLabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlLabeledDataWithPages[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlLabeledDataWithSelectionMark[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlLabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlMultiPageLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlMultiPageUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlNonExistModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlUnlabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeCustomFormUrlUnlabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeGermanContentFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeIDDocumentFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeIDDocumentFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeIDDocumentInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeIDDocumentWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeInvoiceWithPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeLicenseCardData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeLicenseDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeLicenseDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeLicenseSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeMultipageBusinessCardUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeMultipageBusinessCard[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeMultipageInvoice[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptDataWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptFromDataMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptSourceUrlWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerAsyncClientTest.recognizeReceiptSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithDefaultPipeline[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithInvalidApiKeyCredential[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithInvalidEndpoint[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithNullServiceVersion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithRotateToInvalidKey[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientBuilderTest.clientBuilderWithRotateToValidKey[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizeFormTypeComposedModelWithModelName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizeFormTypeComposedModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizeFormTypeLabeledWithModelName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizedFormTypeLabeledModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizedFormTypeUnlabeledModelWithModelName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.checkRecognizedFormTypeUnlabeledModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.invoiceSubLineItemsNull[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.invoiceValidLocale[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.receiptValidLocale[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardDataWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardSourceUrlWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeBusinessCardSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentAppearance[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromDataMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromUrlMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromUrlWithPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentIncorrectLanguageFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentResultWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentResultWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentWithPageRange[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentWithPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentWithPages[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentWithSelectionMarksFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContentWithSelectionMarks[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeContent[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormFromUrlLabeledDataWithNullModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormInvalidStatus[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataExcludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithBlankPdfContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithEmptyModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithJpgContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithNullFormData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithNullModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledDataWithSelectionMark[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormLabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormMultiPageLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormMultiPageUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUnlabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUnlabeledDataWithBlankPdfContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUnlabeledDataWithJpgContentType[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUnlabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlLabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlLabeledDataWithSelectionMark[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlLabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlMultiPageLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlMultiPageUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlNonExistModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlUnlabeledDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeCustomFormUrlUnlabeledData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeGermanContentFromUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeIDDocumentDataNullData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeIDDocumentFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeIDDocumentFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeIDDocumentInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeIDDocumentWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeInvoiceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeLicenseCardData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeLicenseDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeLicenseDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeLicenseSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeMultipageBusinessCardUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeMultipageBusinessCard[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeMultipageInvoice[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptDataIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptDataNullData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptDataWithBlankPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptDataWithContentTypeAutoDetection[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptDataWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptData[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptFromDamagedPdf[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptFromDataMultiPage[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptFromUrlIncludeFieldElements[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptFromUrlWithEncodedBlankSpaceSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptInvalidSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptSourceUrlWithPngFile[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormRecognizerClientTest.recognizeReceiptSourceUrl[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCopyIncorrectRegion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCopyInvalidRegion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCopy[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCreateComposedDuplicateModels[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCreateComposedModelWithOptions[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCreateComposedModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginCreateComposedUnlabeledModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingLabeledModelName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingNullInput[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingUnlabeledModelName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithTrainingLabelsForJPGTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithTrainingLabelsForMultiPagePDFTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsExcludeSubfolderWithNonExistPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsExcludeSubfolderWithPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsForJPGTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsForMultiPagePDFTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsIncludeSubfolderWithNonExistPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.beginTrainingWithoutTrainingLabelsIncludeSubfolderWithPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.copyAuthorization[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.deleteModelInvalidModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.deleteModelValidModelIdWithResponseWithoutTrainingLabels[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.deleteModelValidModelIdWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getCustomModelInvalidModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getCustomModelLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getCustomModelNullModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getCustomModelUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getCustomModelWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.getFormRecognizerClientAndValidate[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.validGetAccountPropertiesWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingAsyncClientTest.validGetAccountProperties[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderDefaultPipeline[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderInvalidEndpoint[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderInvalidKeyCredential[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderNullServiceVersion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderRotateToInvalidKey[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientBuilderTest.trainingClientBuilderRotateToValidKey[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCopyIncorrectRegion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCopyInvalidRegion[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCopy[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCreateComposedDuplicateModels[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCreateComposedModelWithOptions[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCreateComposedModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginCreateComposedUnlabeledModel[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingLabeledModelDisplayName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingNullInput[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithTrainingLabelsForJPGTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithTrainingLabelsForMultiPagePDFTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsExcludeSubfolderWithNonExistPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsExcludeSubfolderWithPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsForJPGTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsForMultiPagePDFTrainingSet[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsIncludeSubfolderWithNonExistPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.beginTrainingWithoutTrainingLabelsIncludeSubfolderWithPrefixName[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.copyAuthorization[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.deleteModelInvalidModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.deleteModelValidModelIdWithResponseWithoutTrainingLabels[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.deleteModelValidModelIdWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getCustomModelInvalidModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getCustomModelLabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getCustomModelNullModelId[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getCustomModelUnlabeled[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getCustomModelWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.getFormRecognizerClientAndValidate[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.validGetAccountPropertiesWithResponse[1].json
delete mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/session-records/FormTrainingClientTest.validGetAccountProperties[1].json
create mode 100644 sdk/formrecognizer/azure-ai-formrecognizer/swagger/FR-v3.yml
delete mode 100644 sdk/keyvault/azure-security-keyvault-administration/src/main/java/com/azure/security/keyvault/administration/implementation/ScopeTokenCache.java
delete mode 100644 sdk/keyvault/azure-security-keyvault-certificates/src/main/java/com/azure/security/keyvault/certificates/implementation/ScopeTokenCache.java
create mode 100644 sdk/keyvault/azure-security-keyvault-jca/src/test/java/com/azure/security/keyvault/jca/KeyVaultKeyStoreUnitTest.java
delete mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/ScopeTokenCache.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/models/KeyRotationPolicy.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/models/KeyRotationPolicyAttributes.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/models/LifetimeAction.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/models/LifetimeActionTrigger.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/implementation/models/LifetimeActionsType.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyRotationLifetimeAction.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyRotationPolicy.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyRotationPolicyAction.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/main/java/com/azure/security/keyvault/keys/models/KeyRotationPolicyProperties.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/java/com/azure/security/keyvault/keys/cryptography/KeyEncryptionKeyClientManagedHsmTest.java
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientManagedHsmTest.createRsaKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientManagedHsmTest.releaseKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.createRsaKeyWithPublicExponent[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.getKeyRotationPolicyOfNonExistentKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.getKeyRotationPolicyWithNoPolicySet[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.rotateKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateGetKeyRotationPolicyWithAllProperties[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyAsyncClientTest.updateGetKeyRotationPolicyWithMinimumProperties[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientManagedHsmTest.createRsaKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientManagedHsmTest.releaseKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.createRsaKeyWithPublicExponent[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.getKeyRotationPolicyOfNonExistentKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.getKeyRotationPolicyWithNoPolicySet[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.rotateKey[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateGetKeyRotationPolicyWithAllProperties[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyClientTest.updateGetKeyRotationPolicyWithMinimumProperties[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyEncryptionKeyClientManagedHsmTest.wrapUnwrapSymmetricAK128[1].json
create mode 100644 sdk/keyvault/azure-security-keyvault-keys/src/test/resources/session-records/KeyEncryptionKeyClientManagedHsmTest.wrapUnwrapSymmetricAK192[1].json
delete mode 100644 sdk/keyvault/azure-security-keyvault-secrets/src/main/java/com/azure/security/keyvault/secrets/implementation/ScopeTokenCache.java
create mode 100644 sdk/resourcemanager/azure-resourcemanager-resources/src/test/resources/session-records/GenericResourcesTests.canValidateMoveResources.json
delete mode 100644 sdk/schemaregistry/azure-data-schemaregistry/src/test/resources/session-records/SchemaRegistryAsyncClientTests.registerAndGetCachedSchema.json
delete mode 100644 sdk/schemaregistry/azure-data-schemaregistry/src/test/resources/session-records/SchemaRegistryClientTests.registerAndGetCachedSchema.json
create mode 100644 sdk/storage/azure-storage-common/src/test-shared/java/com/azure/storage/common/test/shared/policy/NoOpHttpPipelinePolicy.java
delete mode 100644 sdk/storage/microsoft-azure-storage-blob/tests.yml
create mode 100644 sdk/storage/platform-matrix-ci.json
create mode 100644 sdk/storage/tests-template.yml
diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS
index 7403ce79f2f95..47e3e510388de 100644
--- a/.github/CODEOWNERS
+++ b/.github/CODEOWNERS
@@ -56,10 +56,10 @@
/sdk/cosmos/azure-spring-data-cosmos-test/ @kushagraThapar @mbhaskar @saragluna @yiliuTo @chenrujun @backwind1233 @stliu @ZhuXiaoBing-cn @zhichengliu12581 @moarychan @michaelqi793
# PRLabel: %Digital Twins
-/sdk/digitaltwins/ @drwill-ms @timtay-microsoft @abhipsaMisra @azabbasi
+/sdk/digitaltwins/ @drwill-ms @azabbasi @johngallardo
# PRLabel: %Models Repository
-/sdk/modelsrepository @drwill-ms @timtay-microsoft @abhipsaMisra @azabbasi @digimaun
+/sdk/modelsrepository @drwill-ms @timtay-microsoft @abhipsaMisra @azabbasi @digimaun @andykwong-ms
# PRLabel: %Event Grid
/sdk/eventgrid/ @srnagar @lmolkova @mssfang
diff --git a/common/perf-test-core/pom.xml b/common/perf-test-core/pom.xml
index 368b484cf13fe..61fba5257d298 100644
--- a/common/perf-test-core/pom.xml
+++ b/common/perf-test-core/pom.xml
@@ -55,12 +55,12 @@
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
com.beust:jcommander:[1.78]
- io.projectreactor:reactor-core:[3.4.9]
+ io.projectreactor:reactor-core:[3.4.10]
@@ -73,7 +73,7 @@
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
com.beust
@@ -83,7 +83,7 @@
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
diff --git a/common/smoke-tests/pom.xml b/common/smoke-tests/pom.xml
index e5aec68e5b53e..e16147498c9e0 100644
--- a/common/smoke-tests/pom.xml
+++ b/common/smoke-tests/pom.xml
@@ -88,25 +88,25 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
azure-core-tracing-opentelemetry
- 1.0.0-beta.14
+ 1.0.0-beta.15
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
diff --git a/eng/bomgenerator/generateAzureSDKBOM.cmd b/eng/bomgenerator/generateAzureSDKBOM.cmd
deleted file mode 100644
index ef19ca63e98c8..0000000000000
--- a/eng/bomgenerator/generateAzureSDKBOM.cmd
+++ /dev/null
@@ -1,5 +0,0 @@
-set "versioningClientFileLocation=%~dp0..\versioning\version_client.txt"
-set "bomPomFileLocation=%~dp0..\..\sdk\boms\azure-sdk-bom\pom.xml"
-set "outputFileLocation=%~dp0..\..\sdk\boms\azure-sdk-bom\newpom.xml"
-set "reportFileLocation=%~dp0report.html"
-mvn clean install && mvn exec:java -Dexec.args="-inputFile=%versioningClientFileLocation% -outputFile=%outputFileLocation% -pomFile=%bomPomFileLocation% -reportFile=%reportFileLocation%" && copy %~dp0report.html azuresdkbomreport.html
\ No newline at end of file
diff --git a/eng/bomgenerator/generateAzureSDKBOM.ps1 b/eng/bomgenerator/generateAzureSDKBOM.ps1
new file mode 100644
index 0000000000000..1cbb0c8eb9efe
--- /dev/null
+++ b/eng/bomgenerator/generateAzureSDKBOM.ps1
@@ -0,0 +1,28 @@
+$repoRoot = Resolve-Path "${PSScriptRoot}..\..\.."
+$inputDir = Join-Path ${PSScriptRoot} "inputDir"
+$outputDir = Join-Path ${PSScriptRoot} "outputDir"
+$versionClientFileName = "version_client.txt"
+$pomFileName = "pom.xml"
+$defaultVersionClientFilePath = Join-Path $inputDir $versionClientFileName
+$defaultPomFilePath = Join-Path $inputDir $pomFileName
+$versionClientFilePath = Join-Path $repoRoot "eng" "versioning" $versionClientFileName
+$bomPomFilePath = Join-Path $repoRoot "sdk" "containerregistry" "azure-containers-containerregistry" $pomFileName
+
+if(! (Test-Path $inputDir)) {
+ New-Item -Path $PSScriptRoot -Name "inputDir" -ItemType "directory"
+}
+
+if(! (Test-Path $defaultVersionClientFilePath)) {
+ Copy-Item $versionClientFilePath -Destination $inputDir
+}
+
+if(! (Test-Path $defaultPomFilePath)) {
+ Copy-Item $bomPomFilePath -Destination $inputDir
+}
+
+
+"mvn exec:java -Dexec.args='-inputDir=$inputDir -outputDir=$outputDir -mode=analyze'"
+if($LASTEXITCODE -ne 0) {
+ LogError "Failed to generate the BOM."
+ exit 1
+}
\ No newline at end of file
diff --git a/eng/bomgenerator/pom.xml b/eng/bomgenerator/pom.xml
index 75d0ff35874a5..c1913c10007ad 100644
--- a/eng/bomgenerator/pom.xml
+++ b/eng/bomgenerator/pom.xml
@@ -39,6 +39,11 @@
slf4j-log4j12
1.7.5
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-xml
+ 2.12.4
+
@@ -69,10 +74,8 @@
${project.basedir}
com.azure.tools.bomgenerator.Main
- -inputFile=${project.basedir}/../versioning/version_client.txt
- -outputFile=${project.basedir}/target/newbom.xml
- -pomFile=${project.basedir}/../../sdk/boms/azure-sdk-bom/pom.xml
- -reportFile=${project.basedir}/target/dependency_conflictlist.html
+ -inputdir=${project.basedir}/inputdir
+ -outputdir=${project.basedir}/outputdir
false
diff --git a/eng/bomgenerator/readme.md b/eng/bomgenerator/readme.md
index c32be2bb38bf3..7918a357b309b 100644
--- a/eng/bomgenerator/readme.md
+++ b/eng/bomgenerator/readme.md
@@ -3,7 +3,18 @@ This tool generates a BOM from a given set of input dependencies.
This tool has 2 modes
1. Generate mode - When run in this mode the tool generates the BOM. This is also the default mode.
Arguments to run the tool in this mode.
- -inputFile= -outputFile= -pomFile= -inputdependenciesfile=
+ -inputDir=
+ This includes the following files.
+ 1. Version_client.txt file
+ 2. The BOM file which is the initial POM file.
+ 3. InputDependencies file to override the inputs from the version_client.txt. This is an optional file.
+
+ -outputDir=
+ This generates the followibg files in the location.
+ 1. Report log.
+ 2. Newly created BOM file
+
2. Analyze mode - When run in this mode the tool validates the BOM.
Arguments to run the tool in this mode.
- -mode=analyze -pomFile=
+ -mode=analyze -inputDir=
+ This location includes the pom file for the BOM or any library.
diff --git a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/BomGenerator.java b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/BomGenerator.java
index 187000795ab77..1aaff50bf7b4d 100644
--- a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/BomGenerator.java
+++ b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/BomGenerator.java
@@ -13,10 +13,12 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.nio.file.Files;
+import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.Collection;
@@ -48,84 +50,77 @@ public class BomGenerator {
private String overriddenInputDependenciesFileName;
private String reportFileName;
private String mode;
+ private String outputDirectory;
+ private String inputDirectory;
private static Logger logger = LoggerFactory.getLogger(BomGenerator.class);
- BomGenerator() {
- this.mode = GENERATE_MODE;
- }
-
- public String getInputFileName() {
- return this.inputFileName;
- }
-
- public void setInputFileName(String inputFileName) {
- this.inputFileName = inputFileName;
- }
-
- public String getOverriddenInputDependenciesFileName() {
- return this.overriddenInputDependenciesFileName;
- }
+ BomGenerator(String inputDirectory, String outputDirectory, String mode) throws FileNotFoundException {
+ validateNotNullOrEmpty(inputDirectory, "inputDirectory");
+ validateNotNullOrEmpty(outputDirectory, "outputDirectory");
- public void setOverriddenInputDependenciesFileName(String overriddenInputDependenciesFileName) {
- this.overriddenInputDependenciesFileName = overriddenInputDependenciesFileName;
- }
-
- public String getOutputFileName() {
- return this.outputFileName;
- }
+ this.inputDirectory = inputDirectory;
+ this.outputDirectory = outputDirectory;
+ this.mode = (mode == null ? GENERATE_MODE : mode);
- public void setOutputFileName(String outputFileName) {
- this.outputFileName = outputFileName;
- }
+ parseInputs();
+ validateInputs();
- public String getPomFileName() {
- return this.pomFileName;
+ Path outputDirPath = Paths.get(outputDirectory);
+ outputDirPath.toFile().mkdirs();
}
- public void setPomFileName(String pomFileName) {
- this.pomFileName = pomFileName;
- }
-
- public String getReportFileName() {
- return this.reportFileName;
- }
+ private void parseInputs() throws FileNotFoundException {
+ this.outputFileName = Paths.get(outputDirectory, "pom.xml").toString();
+ this.reportFileName = Paths.get(outputDirectory, "dependency_conflictlist.html").toString();
+ this.inputFileName = Paths.get(inputDirectory, "version_client.txt").toString();
+ this.pomFileName = Paths.get(inputDirectory, "pom.xml").toString();
+ this.overriddenInputDependenciesFileName = Paths.get(inputDirectory, "dependencies.txt").toString();
+ }
- public void setReportFileName(String reportFileName) {
- this.reportFileName = reportFileName;
- }
+ private void validateInputs() throws FileNotFoundException {
+ switch (this.mode) {
+ case ANALYZE_MODE:
+ validateFilePath(this.pomFileName);
+ break;
- public String getMode() {
- return this.mode;
+ case GENERATE_MODE:
+ // In generate mode, we should have the inputFile, outputFile and the pomFile.
+ validateFilePath(this.pomFileName);
+ validateFilePath(this.inputFileName);
+ break;
+ }
}
- public void setMode(String mode) {
- this.mode = mode;
- }
+ private void validateFilePath(String filePath) throws FileNotFoundException {
+ if(Files.notExists(Paths.get(filePath))) {
+ throw new FileNotFoundException(String.format("%s not found.", filePath));
+ }
+ }
- public void run() {
+ public boolean run() {
switch (mode) {
case ANALYZE_MODE:
- validate();
- break;
+ return validate();
case GENERATE_MODE:
- generate();
- break;
+ return generate();
default:
logger.error("Unknown value for mode: {}", mode);
break;
}
+
+ return false;
}
- private void validate() {
+ private boolean validate() {
var inputDependencies = parsePomFileContent(this.pomFileName);
DependencyAnalyzer analyzer = new DependencyAnalyzer(inputDependencies, null, this.reportFileName);
- analyzer.validate();
+ return !analyzer.validate();
}
- private void generate() {
+ private boolean generate() {
List inputDependencies = scan();
List externalDependencies = resolveExternalDependencies();
@@ -141,14 +136,15 @@ private void generate() {
outputDependencies = analyzer.getBomEligibleDependencies();
// 4. Create the new BOM file.
- if(!validationFailed) {
+ if (!validationFailed) {
// Rewrite the existing BOM to have the dependencies in the order in which we insert them, making the diff PR easier to review.
rewriteExistingBomFile();
writeBom(outputDependencies);
+ return true;
}
- else {
- logger.trace("Validation for the BOM failed. Exiting...");
- }
+
+ logger.trace("Validation for the BOM failed. Exiting...");
+ return false;
}
private List scanVersioningClientFileDependencies() {
diff --git a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Main.java b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Main.java
index aecb576292cfd..d0a73deeaf206 100644
--- a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Main.java
+++ b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Main.java
@@ -3,14 +3,13 @@
package com.azure.tools.bomgenerator;
+import java.io.FileNotFoundException;
import java.util.regex.Matcher;
import static com.azure.tools.bomgenerator.Utils.ANALYZE_MODE;
-import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_OVERRIDDEN_INPUTDEPENDENCIES_FILE;
-import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_INPUTFILE;
+import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_INPUTDIRECTORY;
+import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_OUTPUTDIRECTORY;
import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_MODE;
-import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_OUTPUTFILE;
-import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_POMFILE;
-import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_REPORTFILE;
+import static com.azure.tools.bomgenerator.Utils.COMMANDLINE_REGEX;
import static com.azure.tools.bomgenerator.Utils.GENERATE_MODE;
import static com.azure.tools.bomgenerator.Utils.validateNotNullOrEmpty;
import static com.azure.tools.bomgenerator.Utils.validateValues;
@@ -18,71 +17,55 @@
public class Main {
public static void main(String[] args) {
- BomGenerator generator = new BomGenerator();
- parseCommandLine(args, generator);
- generator.run();
+ BomGenerator generator = null;
+ try {
+ generator = parseCommandLine(args);
+ if(!generator.run()) {
+ System.exit(1);
+ }
+
+ System.out.println("Completed successfully.");
+ } catch (FileNotFoundException e) {
+ System.out.println("Error occurred.");
+ e.printStackTrace();
+ System.exit(1);
+ }
}
- private static void parseCommandLine(String[] args, BomGenerator generator) {
+ private static BomGenerator parseCommandLine(String[] args) throws FileNotFoundException {
+ String inputDir = null, outputDir = null, mode = null;
for (String arg : args) {
- Matcher matcher = Utils.COMMANDLINE_REGEX.matcher(arg);
+ Matcher matcher = COMMANDLINE_REGEX.matcher(arg);
if (matcher.matches()) {
if (matcher.groupCount() == 2) {
String argName = matcher.group(1);
String argValue = matcher.group(2);
switch (argName.toLowerCase()) {
- case COMMANDLINE_INPUTFILE:
- validateNotNullOrEmpty(argName, argValue);
- generator.setInputFileName(argValue);
- break;
-
- case COMMANDLINE_OVERRIDDEN_INPUTDEPENDENCIES_FILE:
- validateNotNullOrEmpty(argName, argValue);
- generator.setOverriddenInputDependenciesFileName(argValue);
- break;
-
- case COMMANDLINE_OUTPUTFILE:
+ case COMMANDLINE_INPUTDIRECTORY:
validateNotNullOrEmpty(argName, argValue);
- generator.setOutputFileName(argValue);
+ inputDir = argValue;
break;
- case COMMANDLINE_POMFILE:
+ case COMMANDLINE_OUTPUTDIRECTORY:
validateNotNullOrEmpty(argName, argValue);
- generator.setPomFileName(argValue);
- break;
-
- case COMMANDLINE_REPORTFILE:
- validateNotNullOrEmpty(argName, argValue);
- generator.setReportFileName(argValue);
+ outputDir = argValue;
break;
case COMMANDLINE_MODE:
validateNotNullOrEmpty(argName, argValue);
validateValues(argName, argValue, GENERATE_MODE, ANALYZE_MODE);
- generator.setMode(argValue);
+ mode = argValue;
break;
}
}
+
}
}
- validateOptions(generator);
- }
-
- private static void validateOptions(BomGenerator generator) {
- switch (generator.getMode()) {
- case ANALYZE_MODE:
- // In analyze mode, we should ensure that the pom file is set.
- validateNotNullOrEmpty(generator.getPomFileName(), "pomFile");
- break;
-
- case GENERATE_MODE:
- // In generate mode, we should have the inputFile, outputFile and the pomFile.
- validateNotNullOrEmpty(generator.getPomFileName(), "pomFile");
- validateNotNullOrEmpty(generator.getInputFileName(), "inputFileName");
- validateNotNullOrEmpty(generator.getOutputFileName(), "outputFileName");
- break;
- }
+ validateNotNullOrEmpty(inputDir, "inputDir");
+ validateNotNullOrEmpty(outputDir, "outputDir");
+ BomGenerator generator = new BomGenerator(inputDir, outputDir, mode);
+ return generator;
}
}
diff --git a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Utils.java b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Utils.java
index 9d11a3d2005e6..1eed49f964194 100644
--- a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Utils.java
+++ b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/Utils.java
@@ -5,6 +5,9 @@
import com.azure.tools.bomgenerator.models.BomDependency;
import com.azure.tools.bomgenerator.models.BomDependencyNoVersion;
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.dataformat.xml.XmlMapper;
import org.apache.maven.model.Dependency;
import org.apache.maven.model.DependencyManagement;
import org.apache.maven.model.Model;
@@ -17,6 +20,7 @@
import org.jboss.shrinkwrap.resolver.api.maven.MavenStrategyStage;
import org.jboss.shrinkwrap.resolver.api.maven.PomEquippedResolveStage;
import org.jboss.shrinkwrap.resolver.api.maven.PomlessResolveStage;
+import org.jboss.shrinkwrap.resolver.api.maven.ScopeType;
import org.jboss.shrinkwrap.resolver.api.maven.coordinate.MavenDependency;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -32,18 +36,14 @@
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
-import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.regex.Pattern;
import java.util.stream.Collectors;
public class Utils {
- public static final String COMMANDLINE_INPUTFILE = "inputfile";
- public static final String COMMANDLINE_OUTPUTFILE = "outputfile";
- public static final String COMMANDLINE_POMFILE = "pomfile";
- public static final String COMMANDLINE_OVERRIDDEN_INPUTDEPENDENCIES_FILE = "inputdependenciesfile";
- public static final String COMMANDLINE_REPORTFILE = "reportfile";
+ public static final String COMMANDLINE_INPUTDIRECTORY = "inputdir";
+ public static final String COMMANDLINE_OUTPUTDIRECTORY = "outputdir";
public static final String COMMANDLINE_MODE = "mode";
public static final String ANALYZE_MODE = "analyze";
public static final String GENERATE_MODE = "generate";
@@ -183,6 +183,39 @@ static List parsePomFileContent(String fileName) {
}
static List parsePomFileContent(Reader responseStream) {
+ List bomDependencies = new ArrayList<>();
+
+ ObjectMapper mapper = new XmlMapper();
+ mapper.disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES);
+ try {
+ Model value = mapper.readValue(responseStream, Model.class);
+ List dependencies = value.getDependencies();
+
+ if(dependencies == null) {
+ return bomDependencies;
+ }
+
+ for(Dependency dependency : dependencies) {
+ ScopeType scopeType = ScopeType.COMPILE;
+
+ if("test".equals(dependency.getScope())) {
+ scopeType = ScopeType.TEST;
+ }
+
+ bomDependencies.add(new BomDependency(
+ dependency.getGroupId(),
+ dependency.getArtifactId(),
+ dependency.getVersion(),
+ scopeType));
+ }
+ } catch (IOException exception) {
+ exception.printStackTrace();
+ }
+
+ return bomDependencies.stream().distinct().collect(Collectors.toList());
+ }
+
+ static List parseBomFileContent(Reader responseStream) {
MavenXpp3Reader reader = new MavenXpp3Reader();
try {
Model model = reader.read(responseStream);
diff --git a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/BOMReport.java b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/BOMReport.java
index 0e1dcfbb6d73b..19f907e50aa58 100644
--- a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/BOMReport.java
+++ b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/BOMReport.java
@@ -12,9 +12,7 @@
import java.time.LocalDateTime;
import java.time.OffsetDateTime;
import java.time.format.DateTimeFormatter;
-import java.util.ArrayList;
import java.util.Comparator;
-import java.util.HashMap;
import java.util.List;
import java.util.Map;
diff --git a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/ConflictingDependency.java b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/ConflictingDependency.java
index 5f45714607974..a082752b583b6 100644
--- a/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/ConflictingDependency.java
+++ b/eng/bomgenerator/src/main/java/com/azure/tools/bomgenerator/models/ConflictingDependency.java
@@ -12,10 +12,6 @@ public class ConflictingDependency {
this.actualDependency = actualDependency;
}
- ConflictingDependency(BomDependency actualDependency) {
- this.actualDependency = actualDependency;
- }
-
public BomDependency getExpectedDependency() {
return this.expectedDependency;
}
diff --git a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
index 060961b962ab7..2dc315cbba413 100755
--- a/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
+++ b/eng/code-quality-reports/src/main/resources/checkstyle/checkstyle-suppressions.xml
@@ -41,10 +41,6 @@
-
-
-
-
@@ -298,10 +294,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
@@ -578,12 +570,6 @@ the main ServiceBusClientBuilder. -->
-
-
-
-
diff --git a/eng/code-quality-reports/src/main/resources/revapi/revapi.json b/eng/code-quality-reports/src/main/resources/revapi/revapi.json
index e414cb2c4a417..3e91029c98cb8 100644
--- a/eng/code-quality-reports/src/main/resources/revapi/revapi.json
+++ b/eng/code-quality-reports/src/main/resources/revapi/revapi.json
@@ -357,9 +357,9 @@
"justification": "New getter added in azure-core."
},
{
- "code": "java.method.defaultMethodAddedToInterface",
- "new": "method boolean com.azure.core.http.policy.RetryStrategy::shouldRetryException(java.lang.Throwable)",
- "justification": "New default method added in azure-core."
+ "code": "java.method.defaultMethodAddedToInterface",
+ "new": "method boolean com.azure.core.http.policy.RetryStrategy::shouldRetryException(java.lang.Throwable)",
+ "justification": "New default method added in azure-core."
},
{
"code": "java.method.added",
@@ -395,6 +395,26 @@
"code": "java.method.added",
"new": "method com.azure.core.util.BinaryData com.azure.core.util.BinaryData::fromFile(java.nio.file.Path, int)",
"justification": "New method added to BinaryData in azure-core."
+ },
+ {
+ "code": "java.method.added",
+ "new": "method com.azure.core.http.HttpHeaders com.azure.core.http.HttpHeaders::add(java.lang.String, java.lang.String)",
+ "justification": "New method added to HttpHeaders in azure-core."
+ },
+ {
+ "code": "java.method.added",
+ "new": "method reactor.core.publisher.Mono com.azure.core.http.HttpResponse::getBodyAsInputStream()",
+ "justification": "New default method added to HttpResponse in azure-core."
+ },
+ {
+ "code": "java.method.added",
+ "new": "method java.lang.String com.azure.core.credential.TokenRequestContext::getTenantId()",
+ "justification": "New method added to TokenRequestContext in azure-core."
+ },
+ {
+ "code": "java.method.added",
+ "new": "method com.azure.core.credential.TokenRequestContext com.azure.core.credential.TokenRequestContext::setTenantId(java.lang.String)",
+ "justification": "New method added to TokenRequestContext in azure-core."
}
]
}
diff --git a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
index 2f5b5c2e426b3..83d57c6c455e8 100755
--- a/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
+++ b/eng/code-quality-reports/src/main/resources/spotbugs/spotbugs-exclude.xml
@@ -1268,85 +1268,13 @@
-
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/eng/common/scripts/Detect-Api-Changes.ps1 b/eng/common/scripts/Detect-Api-Changes.ps1
index 3752101717942..3c88398ce55d8 100644
--- a/eng/common/scripts/Detect-Api-Changes.ps1
+++ b/eng/common/scripts/Detect-Api-Changes.ps1
@@ -16,7 +16,7 @@ Param (
)
# Submit API review request and return status whether current revision is approved or pending or failed to create review
-function Submit-Request($filePath)
+function Submit-Request($filePath, $packageName)
{
$repoName = $RepoFullName
if (!$repoName) {
@@ -29,6 +29,7 @@ function Submit-Request($filePath)
$query.Add('commitSha', $CommitSha)
$query.Add('repoName', $repoName)
$query.Add('pullRequestNumber', $PullRequestNumber)
+ $query.Add('packageName', $packageName)
$uri = [System.UriBuilder]$APIViewUri
$uri.query = $query.toString()
Write-Host "Request URI: $($uri.Uri.OriginalString)"
@@ -71,6 +72,7 @@ function Log-Input-Params()
Write-Host "Language: $($Language)"
Write-Host "Commit SHA: $($CommitSha)"
Write-Host "Repo Name: $($RepoFullName)"
+ Write-Host "Package Name: $($PackageName)"
}
. (Join-Path $PSScriptRoot common.ps1)
@@ -95,7 +97,7 @@ foreach ($artifact in $ArtifactList)
if (Should-Process-Package -pkgPath $pkgPath -packageName $artifact.name)
{
$filePath = $pkgPath.Replace($ArtifactPath , "").Replace("\", "/")
- $respCode = Submit-Request -filePath $filePath
+ $respCode = Submit-Request -filePath $filePath -packageName $artifact.name
if ($respCode -ne '200')
{
$responses[$artifact.name] = $respCode
@@ -108,12 +110,7 @@ foreach ($artifact in $ArtifactList)
}
}
-if ($responses)
+foreach($pkg in $responses.keys)
{
- # Will update this with a link to wiki on how to resolve
- Write-Warning "API change detection failed for following packages. Please check above for package level error details."
- foreach($pkg in $responses.keys)
- {
- Write-Host "$pkg failed with $($responses[$pkg]) code"
- }
+ Write-Host "API detection request status for $($pkg) : $($responses[$pkg])"
}
diff --git a/eng/common/testproxy/docker-start-proxy.ps1 b/eng/common/testproxy/docker-start-proxy.ps1
index 6e0d0edd2b64e..d32cb4b43f487 100644
--- a/eng/common/testproxy/docker-start-proxy.ps1
+++ b/eng/common/testproxy/docker-start-proxy.ps1
@@ -25,7 +25,7 @@ catch {
Write-Error "Please check your docker invocation and try running the script again."
}
-$SELECTED_IMAGE_TAG = "1084681"
+$SELECTED_IMAGE_TAG = "1108695"
$CONTAINER_NAME = "ambitious_azsdk_test_proxy"
$LINUX_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-lin:${SELECTED_IMAGE_TAG}"
$WINDOWS_IMAGE_SOURCE = "azsdkengsys.azurecr.io/engsys/testproxy-win:${SELECTED_IMAGE_TAG}"
@@ -80,4 +80,4 @@ if ($Mode -eq "stop"){
docker container stop $CONTAINER_NAME
}
}
-}
\ No newline at end of file
+}
diff --git a/eng/guardian-tools/policheck/PolicheckExclusions.xml b/eng/guardian-tools/policheck/PolicheckExclusions.xml
new file mode 100644
index 0000000000000..8aff06de6994b
--- /dev/null
+++ b/eng/guardian-tools/policheck/PolicheckExclusions.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/eng/jacoco-test-coverage/pom.xml b/eng/jacoco-test-coverage/pom.xml
index 50f5b2f1e4d5c..862c224b05e0a 100644
--- a/eng/jacoco-test-coverage/pom.xml
+++ b/eng/jacoco-test-coverage/pom.xml
@@ -44,7 +44,7 @@
com.azure
azure-ai-formrecognizer
- 3.2.0-beta.1
+ 4.0.0-beta.1
com.azure
@@ -114,7 +114,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
@@ -129,7 +129,7 @@
com.azure
azure-core-experimental
- 1.0.0-beta.19
+ 1.0.0-beta.20
com.azure
@@ -154,7 +154,7 @@
com.azure
azure-core-serializer-avro-apache
- 1.0.0-beta.15
+ 1.0.0-beta.16
com.azure
@@ -169,7 +169,7 @@
com.azure
azure-core-tracing-opentelemetry
- 1.0.0-beta.15
+ 1.0.0-beta.16
com.azure
diff --git a/eng/pipelines/aggregate-reports.yml b/eng/pipelines/aggregate-reports.yml
index 262115544f5e7..a76b1a7116bc0 100644
--- a/eng/pipelines/aggregate-reports.yml
+++ b/eng/pipelines/aggregate-reports.yml
@@ -8,177 +8,205 @@ pr:
include:
- eng/pipelines/aggregate-reports.yml
-jobs:
- - job: Reporting
- displayName: Generate reports (with build)
- timeoutInMinutes: 180
- variables:
- - template: /eng/pipelines/templates/variables/globals.yml
- pool:
- vmImage: 'ubuntu-20.04'
- steps:
- - template: /eng/pipelines/templates/steps/cache-maven-repository.yml
- parameters:
- JobType: 'Reporting'
- SDKType: 'client'
- ServiceDirectory: 'aggregate-report'
-
-
- # We `install` the code quality reports tooling into our local m2 cache separately from building the Maven project
- # reports. This means it is available as part of that, but also so that this is not documented in the project report.
- - template: /eng/pipelines/templates/steps/install-reporting-tools.yml
-
- - task: Maven@3
- displayName: 'Build All Libraries'
- inputs:
- mavenPomFile: pom.xml
- options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Paggregatereports'
- mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
- javaHomeOption: 'JDKVersion'
- jdkVersionOption: $(JavaBuildVersion)
- jdkArchitectureOption: 'x64'
- publishJUnitResults: false
- goals: 'clean install'
-
- - task: Maven@3
- displayName: 'Generate Reports'
- inputs:
- mavenPomFile: pom.xml
- options: '$(DefaultOptions) -Dinclude-non-shipping-modules -Dgpg.skip -Paggregatereports'
- mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
- javaHomeOption: 'JDKVersion'
- jdkVersionOption: $(JavaBuildVersion)
- jdkArchitectureOption: 'x64'
- publishJUnitResults: false
- goals: 'verify site:site site:stage'
-
- - task: Maven@3
- condition: succeededOrFailed()
- displayName: 'Generate BOM Reports'
- inputs:
- mavenPomFile: eng/bomgenerator/pom.xml
- options: '$(DefaultOptions)'
- mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
- javaHomeOption: 'JDKVersion'
- jdkVersionOption: $(JavaBuildVersion)
- jdkArchitectureOption: 'x64'
- publishJUnitResults: false
- goals: 'clean package'
-
- - task: PublishTestResults@2
- condition: succeededOrFailed()
- inputs:
- mergeTestResults: true
- testRunTitle: 'Linux on Java $(JavaBuildVersion)'
-
- # Azure DevOps only seems to respect the last code coverage result published, so only do this for Linux + Java LTS.
- # Code coverage reporting is setup only for Track 2 modules.
- - task: PublishCodeCoverageResults@1
- inputs:
- codeCoverageTool: JaCoCo
- summaryFileLocation: target/site/test-coverage/jacoco.xml
- reportDirectory: target/site/test-coverage/
- failIfCoverageEmpty: false
-
- # Publish code coverage to an artifact so it can be uploaded to the Maven site.
- # Do this for track 2 modules only. Code coverage from previous step is only published for Linux + Java LTS.
- - task: PublishPipelineArtifact@0
- displayName: 'Publish coverage artifact'
- inputs:
- artifactName: coverage
- targetPath: target/site/
-
- - pwsh: |
- $(Build.SourcesDirectory)/eng/DependencyGraph/gen-dep-graph-data.ps1
- displayName: Generate Interdependency Report Data
-
- - pwsh: |
- Copy-Item target/staging $(Build.ArtifactStagingDirectory) -Recurse
- Copy-Item eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
- Copy-Item eng/code-quality-reports/src/main/resources/dependency-allowlist.html $(Build.ArtifactStagingDirectory)/staging
-
- Copy-Item eng/common/InterdependencyGraph.html $(Build.ArtifactStagingDirectory)/staging
- Copy-Item data.js $(Build.ArtifactStagingDirectory)/staging
- displayName: 'Copy reports to artifact staging'
-
- - pwsh: |
- Copy-Item eng/bomgenerator/target/dependency_conflictlist.html $(Build.ArtifactStagingDirectory)/staging
-
- displayName: 'Copy BOM report to artifact staging'
- condition: succeededOrFailed()
-
-
- - publish: $(Build.ArtifactStagingDirectory)
- condition: succeededOrFailed()
- displayName: 'Publish Report Artifacts'
- artifact: reports
-
- - template: /eng/pipelines/templates/steps/upload-repository-on-failure.yml
-
- - job: Compliance
- displayName: Analyze (no build)
- timeoutInMinutes: 120
- variables:
- - template: /eng/pipelines/templates/variables/globals.yml
- pool:
- # CredScan build task is Windows only (https://aka.ms/credscan).
- vmImage: 'windows-2019'
- steps:
- - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
- # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
- # builds should be sufficient.
- # Only run if building all libraries succeeded.
- condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
- displayName: 'Component Detection'
-
- # Put cred scan step before install and build packages to avoid the tool scans generated folder like /target.
- - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
- displayName: 'Run CredScan'
- inputs:
- suppressionsFile: 'eng\CredScanSuppression.json'
- condition: succeededOrFailed()
- - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
- displayName: 'Post Analysis'
- inputs:
- GdnBreakAllTools: false
- GdnBreakGdnToolCredScan: true
- GdnBreakGdnToolCredScanSeverity: Error
- GdnBreakBaselineFiles: $(Build.SourcesDirectory)\eng\java.gdnbaselines
- GdnBreakBaselines: baseline
- # Used for generating baseline file.
- # GdnBreakOutputBaselineFile: java
- # GdnBreakOutputBaseline: baseline
- condition: succeededOrFailed()
- continueOnError: true
- - pwsh: |
- $results = (Get-Content "$(Pipeline.workspace)\.gdn\.r\CredScan\001\CredScan-matches.sarif" | ConvertFrom-Json).runs.results
- $csvRows = @()
- $pathMatchRegex = ("$(Build.SourcesDirectory)" -replace "\\", "/")
- $results | ForEach-Object {
- $csvRows += [pscustomobject]@{
- ruleId = $_.ruleId
- ruleIndex = $_.ruleIndex
- fingerprints = $_.fingerprints
- message = $_.message
- properties = $_.properties
- rank = $_.rank
- fileName = $_.analysisTarget.uri -replace ".*$pathMatchRegex(.*)", "https://github.com/Azure/azure-sdk-for-java/blob/main/`$1"
- startLine = $_.locations.physicalLocation.region.startLine
- startColumn = $_.locations.physicalLocation.region.startColumn
- endLine = $_.locations.physicalLocation.region.endLine
- endColumn = $_.locations.physicalLocation.region.endColumn
- level = $_.level
- }
- }
- $csvRows | Export-Csv -Path "$(Pipeline.workspace)\.gdn\.r\CredScan\001\CredScan-matches.csv" -NoTypeInformation
- displayName: Add converted csv file for CredScan-matches.sarif
- - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
- displayName: 'Publish Security Analysis Logs'
- condition: succeededOrFailed()
- # Run link verification at the end as it will run no matter the pipeline passing or failing.
- # If this task fails with an error it shouldn't prevent aggregate reports from being generated.
- - template: /eng/common/pipelines/templates/steps/verify-links.yml
- parameters:
- Directory: ""
- CheckLinkGuidance: $true
- Condition: succeededOrFailed()
+variables:
+ - template: /eng/pipelines/templates/variables/globals.yml
+
+stages:
+ - stage: AggregateReports
+ displayName: Aggregate Reports
+
+ jobs:
+ - job: Reporting
+ displayName: Generate reports (with build)
+ timeoutInMinutes: 180
+
+ pool:
+ vmImage: 'ubuntu-20.04'
+
+ steps:
+ - template: /eng/pipelines/templates/steps/cache-maven-repository.yml
+ parameters:
+ JobType: 'Reporting'
+ SDKType: 'client'
+ ServiceDirectory: 'aggregate-report'
+
+
+ # We `install` the code quality reports tooling into our local m2 cache separately from building the Maven project
+ # reports. This means it is available as part of that, but also so that this is not documented in the project report.
+ - template: /eng/pipelines/templates/steps/install-reporting-tools.yml
+
+ - task: Maven@3
+ displayName: 'Build All Libraries'
+ inputs:
+ mavenPomFile: pom.xml
+ options: '$(DefaultOptions) -T 2C -DskipTests -Dgpg.skip -Dmaven.javadoc.skip=true -Dcheckstyle.skip=true -Dspotbugs.skip=true -Djacoco.skip=true -Drevapi.skip=true -Paggregatereports'
+ mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: $(JavaBuildVersion)
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+ goals: 'clean install'
+
+ - task: Maven@3
+ displayName: 'Generate Reports'
+ inputs:
+ mavenPomFile: pom.xml
+ options: '$(DefaultOptions) -Dinclude-non-shipping-modules -Dgpg.skip -Paggregatereports'
+ mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: $(JavaBuildVersion)
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+ goals: 'verify site:site site:stage'
+
+ - task: Maven@3
+ condition: succeededOrFailed()
+ displayName: 'Generate BOM Reports'
+ inputs:
+ mavenPomFile: eng/bomgenerator/pom.xml
+ options: '$(DefaultOptions)'
+ mavenOptions: '$(MemoryOptions) $(LoggingOptions)'
+ javaHomeOption: 'JDKVersion'
+ jdkVersionOption: $(JavaBuildVersion)
+ jdkArchitectureOption: 'x64'
+ publishJUnitResults: false
+ goals: 'clean package'
+
+ - task: PublishTestResults@2
+ condition: succeededOrFailed()
+ inputs:
+ mergeTestResults: true
+ testRunTitle: 'Linux on Java $(JavaBuildVersion)'
+
+ # Azure DevOps only seems to respect the last code coverage result published, so only do this for Linux + Java LTS.
+ # Code coverage reporting is setup only for Track 2 modules.
+ - task: PublishCodeCoverageResults@1
+ inputs:
+ codeCoverageTool: JaCoCo
+ summaryFileLocation: target/site/test-coverage/jacoco.xml
+ reportDirectory: target/site/test-coverage/
+ failIfCoverageEmpty: false
+
+ # Publish code coverage to an artifact so it can be uploaded to the Maven site.
+ # Do this for track 2 modules only. Code coverage from previous step is only published for Linux + Java LTS.
+ - task: PublishPipelineArtifact@0
+ displayName: 'Publish coverage artifact'
+ inputs:
+ artifactName: coverage
+ targetPath: target/site/
+
+ - pwsh: |
+ $(Build.SourcesDirectory)/eng/DependencyGraph/gen-dep-graph-data.ps1
+ displayName: Generate Interdependency Report Data
+
+ - pwsh: |
+ Copy-Item target/staging $(Build.ArtifactStagingDirectory) -Recurse
+ Copy-Item eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory)
+ Copy-Item eng/code-quality-reports/src/main/resources/dependency-allowlist.html $(Build.ArtifactStagingDirectory)/staging
+
+ Copy-Item eng/common/InterdependencyGraph.html $(Build.ArtifactStagingDirectory)/staging
+ Copy-Item data.js $(Build.ArtifactStagingDirectory)/staging
+ displayName: 'Copy reports to artifact staging'
+
+ - pwsh: |
+ Copy-Item eng/bomgenerator/target/dependency_conflictlist.html $(Build.ArtifactStagingDirectory)/staging
+
+ displayName: 'Copy BOM report to artifact staging'
+ condition: succeededOrFailed()
+
+
+ - publish: $(Build.ArtifactStagingDirectory)
+ condition: succeededOrFailed()
+ displayName: 'Publish Report Artifacts'
+ artifact: reports
+
+ - template: /eng/pipelines/templates/steps/upload-repository-on-failure.yml
+
+ - job: Compliance
+ displayName: Analyze (no build)
+ timeoutInMinutes: 120
+ variables:
+ - template: /eng/pipelines/templates/variables/globals.yml
+ pool:
+ # CredScan build task is Windows only (https://aka.ms/credscan).
+ vmImage: 'windows-2019'
+ steps:
+ - task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
+ # ComponentGovernance is currently unable to run on pull requests of public projects. Running on non-PR
+ # builds should be sufficient.
+ # Only run if building all libraries succeeded.
+ condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest'))
+ displayName: 'Component Detection'
+
+ # Run link verification at the end as it will run no matter the pipeline passing or failing.
+ # If this task fails with an error it shouldn't prevent aggregate reports from being generated.
+ - template: /eng/common/pipelines/templates/steps/verify-links.yml
+ parameters:
+ Directory: ""
+ CheckLinkGuidance: $true
+ Condition: succeededOrFailed()
+
+ - stage: ComplianceTools
+ displayName: Compliance Tools
+ dependsOn: []
+
+ jobs:
+ - job: ComplianceTools
+ timeoutInMinutes: 120
+
+ pool:
+ name: azsdk-pool-mms-win-2019-general
+ vmImage: MMS2019
+
+ steps:
+ - template: /eng/common/pipelines/templates/steps/policheck.yml
+ parameters:
+ ExclusionDataBaseFileName: "JavaPoliCheckExclusion"
+ PublishAnalysisLogs: false
+
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-credscan.CredScan@3
+ displayName: 'Run CredScan'
+ inputs:
+ suppressionsFile: 'eng\CredScanSuppression.json'
+ condition: succeededOrFailed()
+
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-postanalysis.PostAnalysis@2
+ displayName: 'Post Analysis'
+ inputs:
+ GdnBreakAllTools: false
+ GdnBreakGdnToolCredScan: true
+ GdnBreakGdnToolCredScanSeverity: Error
+ GdnBreakBaselineFiles: $(Build.SourcesDirectory)\eng\java.gdnbaselines
+ GdnBreakBaselines: baseline
+ # Used for generating baseline file.
+ # GdnBreakOutputBaselineFile: java
+ # GdnBreakOutputBaseline: baseline
+ condition: succeededOrFailed()
+ continueOnError: true
+
+ - pwsh: |
+ $results = (Get-Content "$(Pipeline.workspace)\.gdn\.r\CredScan\001\CredScan-matches.sarif" | ConvertFrom-Json).runs.results
+ $csvRows = @()
+ $pathMatchRegex = ("$(Build.SourcesDirectory)" -replace "\\", "/")
+ $results | ForEach-Object {
+ $csvRows += [pscustomobject]@{
+ ruleId = $_.ruleId
+ ruleIndex = $_.ruleIndex
+ fingerprints = $_.fingerprints
+ message = $_.message
+ properties = $_.properties
+ rank = $_.rank
+ fileName = $_.analysisTarget.uri -replace ".*$pathMatchRegex(.*)", "https://github.com/Azure/azure-sdk-for-java/blob/main/`$1"
+ startLine = $_.locations.physicalLocation.region.startLine
+ startColumn = $_.locations.physicalLocation.region.startColumn
+ endLine = $_.locations.physicalLocation.region.endLine
+ endColumn = $_.locations.physicalLocation.region.endColumn
+ level = $_.level
+ }
+ }
+ $csvRows | Export-Csv -Path "$(Pipeline.workspace)\.gdn\.r\CredScan\001\CredScan-matches.csv" -NoTypeInformation
+ displayName: Add converted csv file for CredScan-matches.sarif
+
+ - task: securedevelopmentteam.vss-secure-development-tools.build-task-publishsecurityanalysislogs.PublishSecurityAnalysisLogs@3
+ displayName: 'Publish Security Analysis Logs'
+ condition: succeededOrFailed()
diff --git a/eng/pipelines/scripts/generate_overview_from_readme.py b/eng/pipelines/scripts/generate_overview_from_readme.py
index 09fb6d77c7f43..56b542f298e27 100644
--- a/eng/pipelines/scripts/generate_overview_from_readme.py
+++ b/eng/pipelines/scripts/generate_overview_from_readme.py
@@ -16,13 +16,13 @@
import argparse
from bs4 import BeautifulSoup
+import pdb
import markdown2
import os.path
from io import open
import re
-import sys
-def generate_overview(readme_file, version):
+def generate_overview(readme_file, version, overview_file_path):
readme_exists = False
if os.path.exists(readme_file) and os.path.isfile(readme_file):
@@ -33,7 +33,10 @@ def generate_overview(readme_file, version):
# allow processing to continue without failing the build the way a raise would.
print('{} does not exist'.format(readme_file))
- html_overview_file = str(readme_file).lower().replace('readme.md', 'readme_overview.html')
+ if overview_file_path:
+ html_overview_file = overview_file_path + 'readme_overview.html'
+ else:
+ html_overview_file = str(readme_file).lower().replace('readme.md', 'readme_overview.html')
if (readme_exists):
with open(readme_file, 'r', encoding='utf-8') as f:
@@ -45,6 +48,14 @@ def generate_overview(readme_file, version):
# The toc helps the anchor link to jump to the right place.
html_readme_content = markdown2.markdown(re.sub(pattern='@', repl='{@literal @}', string=readme_content, flags=re.MULTILINE), extras=["fenced-code-blocks", "target-blank-links", "toc"])
+ # Now use BeautifulSoup to cleanup the generated HTML so that it conforms to Javadoc compliance.
+ soup = BeautifulSoup(html_readme_content, features="html.parser")
+
+ # Find all anchor tags with the rel attribute and remove the attribute.
+ anchors_with_rel = soup.find_all(name='a', attrs={'rel':'noopener'})
+ for anchor in anchors_with_rel:
+ del anchor['rel']
+
# The html_readme_content needs to be encapsulated inside of tags in order
# for the content to correctly be added to the landing page
with open(html_overview_file, 'w', encoding='utf-8') as f:
@@ -52,20 +63,21 @@ def generate_overview(readme_file, version):
# This will allow this code to work for python 2 and 3
f.write('')
f.write('Current version is {}, click here for the index'.format(version))
- f.write(' ')
+ f.write(' ')
if (readme_exists):
- f.write(str(html_readme_content))
+ f.write(str(soup.encode(formatter="html5").decode('utf-8')))
f.write('')
def main():
parser = argparse.ArgumentParser(description='Generate a readme_overview.html from a README.md.')
parser.add_argument('--readme-file', '--rf', help='path to the README.md file to readme_generate the overview.html file from.', required=True)
+ parser.add_argument('--overview-file-path', '--ofp', help='path to the overview.html file.')
parser.add_argument('--version', '--v', help='Version, used on the landing page to identify the version.', required=True)
args = parser.parse_args()
# verify the argument is a readme.md file
if str(args.readme_file).lower().endswith('readme.md'):
- generate_overview(args.readme_file, args.version)
+ generate_overview(args.readme_file, args.version, args.overview_file_path)
else:
raise ValueError('{} is not a readmefile. The --readme-file argument must be a readme.md file.'.format(args.readme_file))
diff --git a/eng/pipelines/templates/jobs/ci.yml b/eng/pipelines/templates/jobs/ci.yml
index f354aef0b263b..d10ae8dab8b45 100644
--- a/eng/pipelines/templates/jobs/ci.yml
+++ b/eng/pipelines/templates/jobs/ci.yml
@@ -154,6 +154,10 @@ jobs:
ArtifactPath: $(Build.ArtifactStagingDirectory)
ArtifactName: '$(ArtifactName)'
+ - template: /eng/common/pipelines/templates/steps/detect-api-changes.yml
+ parameters:
+ Artifacts: ${{parameters.Artifacts}}
+
- template: ../steps/upload-repository-on-failure.yml
- job: 'Analyze'
diff --git a/eng/spotbugs-aggregate-report/pom.xml b/eng/spotbugs-aggregate-report/pom.xml
index fa9636c682d6c..6696fd428a954 100644
--- a/eng/spotbugs-aggregate-report/pom.xml
+++ b/eng/spotbugs-aggregate-report/pom.xml
@@ -56,7 +56,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
-maxLineLength 120
diff --git a/eng/versioning/external_dependencies.txt b/eng/versioning/external_dependencies.txt
index ae20b646c28fe..f65930afa607e 100644
--- a/eng/versioning/external_dependencies.txt
+++ b/eng/versioning/external_dependencies.txt
@@ -7,18 +7,18 @@
# Format;
# groupId:artifactId;dependency-version
-com.fasterxml.jackson.core:jackson-annotations;2.12.4
-com.fasterxml.jackson.core:jackson-core;2.12.4
-com.fasterxml.jackson.core:jackson-databind;2.12.4
-com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.12.4
-com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.12.4
-com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.12.4
-com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.12.4
-com.fasterxml.jackson.module:jackson-module-parameter-names;2.12.4
+com.fasterxml.jackson.core:jackson-annotations;2.12.5
+com.fasterxml.jackson.core:jackson-core;2.12.5
+com.fasterxml.jackson.core:jackson-databind;2.12.5
+com.fasterxml.jackson.dataformat:jackson-dataformat-avro;2.12.5
+com.fasterxml.jackson.dataformat:jackson-dataformat-xml;2.12.5
+com.fasterxml.jackson.datatype:jackson-datatype-jdk8;2.12.5
+com.fasterxml.jackson.datatype:jackson-datatype-jsr310;2.12.5
+com.fasterxml.jackson.module:jackson-module-parameter-names;2.12.5
com.github.spotbugs:spotbugs;4.2.2
com.github.spotbugs:spotbugs-annotations;4.2.2
com.github.spotbugs:spotbugs-maven-plugin;4.2.2
-com.google.code.gson:gson;2.8.7
+com.google.code.gson:gson;2.8.8
com.google.guava:guava;30.1.1-jre
com.h3xstream.findsecbugs:findsecbugs-plugin;1.9.0
com.microsoft.azure:azure-annotations;1.7.0
@@ -46,20 +46,21 @@ io.github.bonigarcia:webdrivermanager;4.3.1
io.micrometer:micrometer-core;1.7.3
io.micrometer:micrometer-registry-azure-monitor;1.7.3
io.micrometer:micrometer-registry-graphite;1.7.3
-io.netty:netty-buffer;4.1.67.Final
-io.netty:netty-common;4.1.67.Final
-io.netty:netty-codec-http;4.1.67.Final
-io.netty:netty-codec-http2;4.1.67.Final
-io.netty:netty-transport;4.1.67.Final
-io.netty:netty-handler;4.1.67.Final
-io.netty:netty-handler-proxy;4.1.67.Final
-io.netty:netty-tcnative;2.0.40.Final
-io.netty:netty-tcnative-boringssl-static;2.0.40.Final
-io.netty:netty-transport-native-epoll;4.1.67.Final
-io.netty:netty-transport-native-unix-common;4.1.67.Final
-io.netty:netty-transport-native-kqueue;4.1.67.Final
-io.projectreactor.netty:reactor-netty;1.0.10
-io.projectreactor:reactor-core;3.4.9
+io.netty:netty-buffer;4.1.68.Final
+io.netty:netty-common;4.1.68.Final
+io.netty:netty-codec-http;4.1.68.Final
+io.netty:netty-codec-http2;4.1.68.Final
+io.netty:netty-transport;4.1.68.Final
+io.netty:netty-handler;4.1.68.Final
+io.netty:netty-handler-proxy;4.1.68.Final
+io.netty:netty-tcnative;2.0.43.Final
+io.netty:netty-tcnative-boringssl-static;2.0.43.Final
+io.netty:netty-transport-native-epoll;4.1.68.Final
+io.netty:netty-transport-native-unix-common;4.1.68.Final
+io.netty:netty-transport-native-kqueue;4.1.68.Final
+io.projectreactor.netty:reactor-netty;1.0.11
+io.projectreactor.netty:reactor-netty-http;1.0.11
+io.projectreactor:reactor-core;3.4.10
io.reactivex:rxjava;1.3.8
javax.annotation:javax.annotation-api;1.3.2
javax.json:javax.json-api;1.1.4
@@ -81,6 +82,7 @@ org.apache.qpid:proton-j;0.33.8
org.apache.qpid:qpid-jms-client;0.53.0
org.apache.tinkerpop:gremlin-driver;3.2.4
org.asynchttpclient:async-http-client;2.12.1
+org.codehaus.gmavenplus:gmavenplus-plugin;1.13.0
org.codehaus.groovy:groovy-eclipse-batch;2.5.8-01
org.codehaus.groovy:groovy-eclipse-compiler;3.4.0-01
org.conscrypt:conscrypt-openjdk-uber;2.2.1
@@ -175,7 +177,7 @@ io.opentelemetry:opentelemetry-api;1.0.0
io.opentelemetry:opentelemetry-sdk;1.0.0
io.opentelemetry:opentelemetry-exporter-logging;1.0.0
io.opentelemetry:opentelemetry-exporter-jaeger;1.0.0
-io.projectreactor:reactor-test;3.4.9
+io.projectreactor:reactor-test;3.4.10
junit:junit;4.13.2
commons-cli:commons-cli;1.3
org.apache.maven:maven-compat;3.6.2
@@ -209,6 +211,7 @@ org.junit.vintage:junit-vintage-engine;5.7.2
org.openjdk.jmh:jmh-core;1.22
org.openjdk.jmh:jmh-generator-annprocess;1.22
org.spockframework:spock-core;2.0-M4-groovy-2.5
+groovy3_org.spockframework:spock-core;2.0-groovy-3.0
org.testng:testng;7.3.0
uk.org.lidalia:slf4j-test;1.2.0
@@ -240,7 +243,7 @@ org.apache.maven.plugins:maven-enforcer-plugin;3.0.0-M3
org.apache.maven.plugins:maven-failsafe-plugin;2.22.0
org.apache.maven.plugins:maven-help-plugin;2.1.1
org.apache.maven.plugins:maven-jar-plugin;3.1.2
-org.apache.maven.plugins:maven-javadoc-plugin;3.1.1
+org.apache.maven.plugins:maven-javadoc-plugin;3.3.1
org.apache.maven.plugins:maven-jxr-plugin;3.0.0
org.apache.maven.plugins:maven-project-info-reports-plugin;3.0.0
org.apache.maven.plugins:maven-release-plugin;2.5.3
@@ -267,6 +270,7 @@ org.revapi:revapi-java;0.20.0
org.revapi:revapi-maven-plugin;0.11.2
org.moditect:moditect-maven-plugin;1.0.0.RC1
org.ow2.asm:asm;9.1
+com.azure.tools:codesnippet-maven-plugin;1.0.0-beta.1
# External Dependency Exceptions
# This section is for external dependencies whose versions were different than
@@ -285,7 +289,7 @@ org.ow2.asm:asm;9.1
test_jar_com.microsoft.azure:azure-mgmt-resources;1.3.1-SNAPSHOT
# everything under sdk\cosmos
-cosmos_com.fasterxml.jackson.module:jackson-module-afterburner;2.12.2
+cosmos_com.fasterxml.jackson.module:jackson-module-afterburner;2.12.5
cosmos_com.google.guava:guava;25.0-jre
cosmos_com.microsoft.data.encryption:cryptography;0.2.2.jre8-preview
cosmos_com.microsoft.data.encryption:azure-key-vault-keystoreprovider;0.2.2.jre8-preview
@@ -350,9 +354,6 @@ resourcemanager_com.jcraft:jsch;0.1.55
# sdk\storage\azure-storage-blob-cryptography\pom.xml
storage_com.microsoft.azure:azure-storage;8.4.0
-# sdk\storage\microsoft-azure-storage-blob\pom.xml
-microsoft_azure_storage_blob_org.spockframework:spock-core;1.3-groovy-2.5
-
# sdk\spring\azure-spring-boot\pom.xml
spring_com.microsoft.azure:azure;1.34.0
spring_org.springframework.kafka:spring-kafka;2.6.6
diff --git a/eng/versioning/version_client.txt b/eng/versioning/version_client.txt
index dc109de978b23..a23ebc6f7fa3f 100644
--- a/eng/versioning/version_client.txt
+++ b/eng/versioning/version_client.txt
@@ -37,7 +37,7 @@ com.azure:azure-sdk-all;1.0.0;1.0.0
com.azure:azure-sdk-parent;1.6.0;1.6.0
com.azure:azure-client-sdk-parent;1.7.0;1.7.0
com.azure:azure-ai-anomalydetector;3.0.0-beta.2;3.0.0-beta.3
-com.azure:azure-ai-formrecognizer;3.1.4;3.2.0-beta.1
+com.azure:azure-ai-formrecognizer;3.1.4;4.0.0-beta.1
com.azure:azure-ai-formrecognizer-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-ai-documenttranslator;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-ai-metricsadvisor;1.0.2;1.1.0-beta.1
@@ -60,20 +60,20 @@ com.azure:azure-communication-phonenumbers;1.0.4;1.1.0-beta.1
com.azure:azure-communication-networktraversal;1.0.0-beta.1;1.0.0-beta.2
com.azure:azure-containers-containerregistry;1.0.0-beta.4;1.0.0-beta.5
com.azure:azure-containers-containerregistry-perf;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-core;1.20.0;1.21.0-beta.1
+com.azure:azure-core;1.21.0;1.22.0-beta.1
com.azure:azure-core-amqp;2.3.2;2.4.0-beta.1
com.azure:azure-core-amqp-experimental;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-core-experimental;1.0.0-beta.18;1.0.0-beta.19
+com.azure:azure-core-experimental;1.0.0-beta.19;1.0.0-beta.20
com.azure:azure-core-http-jdk-httpclient;1.0.0-beta.1;1.0.0-beta.1
-com.azure:azure-core-http-netty;1.11.0;1.12.0-beta.1
-com.azure:azure-core-http-okhttp;1.7.3;1.8.0-beta.1
-com.azure:azure-core-management;1.4.1;1.5.0-beta.1
-com.azure:azure-core-serializer-avro-apache;1.0.0-beta.14;1.0.0-beta.15
+com.azure:azure-core-http-netty;1.11.1;1.12.0-beta.1
+com.azure:azure-core-http-okhttp;1.7.4;1.8.0-beta.1
+com.azure:azure-core-management;1.4.2;1.5.0-beta.1
+com.azure:azure-core-serializer-avro-apache;1.0.0-beta.15;1.0.0-beta.16
com.azure:azure-core-serializer-avro-jackson;1.0.0-beta.1;1.0.0-beta.2
-com.azure:azure-core-serializer-json-gson;1.1.6;1.2.0-beta.1
-com.azure:azure-core-serializer-json-jackson;1.2.7;1.3.0-beta.1
-com.azure:azure-core-test;1.7.1;1.8.0-beta.1
-com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.14;1.0.0-beta.15
+com.azure:azure-core-serializer-json-gson;1.1.7;1.2.0-beta.1
+com.azure:azure-core-serializer-json-jackson;1.2.8;1.3.0-beta.1
+com.azure:azure-core-test;1.7.2;1.8.0-beta.1
+com.azure:azure-core-tracing-opentelemetry;1.0.0-beta.15;1.0.0-beta.16
com.azure:azure-cosmos;4.19.0;4.19.1
com.azure:azure-cosmos-benchmark;4.0.1-beta.1;4.0.1-beta.1
com.azure:azure-cosmos-dotnet-benchmark;4.0.1-beta.1;4.0.1-beta.1
@@ -140,11 +140,11 @@ com.microsoft.azure:spring-cloud-azure-appconfiguration-config;1.3.0;1.4.0-beta.
com.microsoft.azure:spring-cloud-azure-feature-management-web;1.3.0;1.4.0-beta.1
com.microsoft.azure:spring-cloud-azure-feature-management;1.3.0;1.4.0-beta.1
com.microsoft.azure:spring-cloud-starter-azure-appconfiguration-config;1.3.0;1.4.0-beta.1
-com.azure.spring:azure-spring-cloud-appconfiguration-config-web;2.1.0;2.1.1
-com.azure.spring:azure-spring-cloud-appconfiguration-config;2.1.0;2.1.1
-com.azure.spring:azure-spring-cloud-feature-management-web;2.0.0;2.0.1
-com.azure.spring:azure-spring-cloud-feature-management;2.0.0;2.0.1
-com.azure.spring:azure-spring-cloud-starter-appconfiguration-config;2.1.0;2.1.1
+com.azure.spring:azure-spring-cloud-appconfiguration-config-web;2.1.1;2.2.0-beta.1
+com.azure.spring:azure-spring-cloud-appconfiguration-config;2.1.1;2.2.0-beta.1
+com.azure.spring:azure-spring-cloud-feature-management-web;2.0.1;2.1.0-beta.1
+com.azure.spring:azure-spring-cloud-feature-management;2.0.1;2.1.0-beta.1
+com.azure.spring:azure-spring-cloud-starter-appconfiguration-config;2.1.1;2.2.0-beta.1
com.azure.spring:azure-identity-spring;1.9.0;1.10.0-beta.1
com.azure.spring:azure-spring-boot-bom;3.8.0;3.9.0
com.azure.spring:azure-spring-boot-starter-active-directory-b2c;3.9.0;3.10.0-beta.1
@@ -326,7 +326,6 @@ com.azure.resourcemanager:azure-resourcemanager-extendedlocation;1.0.0-beta.1;1.
# note: The unreleased dependencies will not be manipulated with the automatic PR creation code.
# In the pom, the version update tag after the version should name the unreleased package and the dependency version:
#
-unreleased_com.azure:azure-core;1.21.0-beta.1
# Released Beta dependencies: Copy the entry from above, prepend "beta_", remove the current
# version and set the version to the released beta. Released beta dependencies are only valid
diff --git a/pom.xml b/pom.xml
index 825a6a88e93a2..de84a0e27ede3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -160,7 +160,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
1.8
Azure SDK for Java Reference Documentation
@@ -586,7 +586,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
non-aggregate
diff --git a/sdk/advisor/azure-resourcemanager-advisor/pom.xml b/sdk/advisor/azure-resourcemanager-advisor/pom.xml
index 9c664468e26f3..9bcbff7a5d35a 100644
--- a/sdk/advisor/azure-resourcemanager-advisor/pom.xml
+++ b/sdk/advisor/azure-resourcemanager-advisor/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/agrifood/azure-verticals-agrifood-farming/pom.xml b/sdk/agrifood/azure-verticals-agrifood-farming/pom.xml
index 58c7633a4737b..637ef42c009cf 100644
--- a/sdk/agrifood/azure-verticals-agrifood-farming/pom.xml
+++ b/sdk/agrifood/azure-verticals-agrifood-farming/pom.xml
@@ -41,17 +41,17 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-experimental
- 1.0.0-beta.18
+ 1.0.0-beta.19
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
@@ -76,7 +76,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -100,7 +100,7 @@
com.azure
azure-core-serializer-json-jackson
- 1.2.7
+ 1.2.8
test
diff --git a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml
index 924633f114fa3..7a4edd759319b 100644
--- a/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml
+++ b/sdk/anomalydetector/azure-ai-anomalydetector/pom.xml
@@ -38,12 +38,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
@@ -68,7 +68,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml b/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml
index 0874e337da72f..2b00284025813 100644
--- a/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml
+++ b/sdk/apimanagement/azure-resourcemanager-apimanagement/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
index a74fc9ca5c5e8..d4a4fb680a64d 100644
--- a/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
+++ b/sdk/appconfiguration/azure-data-appconfiguration/pom.xml
@@ -44,25 +44,25 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
@@ -92,7 +92,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml
index 4445ca76f7d6a..6676e8ed5fe65 100644
--- a/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml
+++ b/sdk/appconfiguration/azure-resourcemanager-appconfiguration/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/CHANGELOG.md
index b460c14997b05..4482246435611 100644
--- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.2.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 2.1.1 (2021-09-28)
### Bugs Fixed
diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/pom.xml
index 1648d6bca93a1..707daaff8f99e 100644
--- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config-web/pom.xml
@@ -12,7 +12,7 @@
com.azure.spring
azure-spring-cloud-appconfiguration-config-web
- 2.1.1
+ 2.2.0-beta.1
Azure Spring Cloud App Configuration Config Web
Integration of Spring Cloud Config and Azure App Configuration Service
@@ -20,7 +20,7 @@
com.azure.spring
azure-spring-cloud-appconfiguration-config
- 2.1.1
+ 2.2.0-beta.1
org.springframework.boot
diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/CHANGELOG.md
index 4569ae7014dc5..013e93a600660 100644
--- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.2.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 2.1.1 (2021-09-28)
### Bugs Fixed
diff --git a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml
index 7a20f88dc531e..a35bef5696cd2 100644
--- a/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-appconfiguration-config/pom.xml
@@ -12,7 +12,7 @@
com.azure.spring
azure-spring-cloud-appconfiguration-config
- 2.1.1
+ 2.2.0-beta.1
Azure Spring Cloud App Configuration Config
Integration of Spring Cloud Config and Azure App Configuration Service
@@ -46,18 +46,18 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -77,7 +77,7 @@
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
org.hibernate.validator
@@ -126,8 +126,8 @@
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
javax.annotation:javax.annotation-api:[1.3.2]
org.apache.commons:commons-lang3:[3.12.0]
org.apache.httpcomponents:httpclient:[4.5.13]
diff --git a/sdk/appconfiguration/azure-spring-cloud-feature-management-web/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-feature-management-web/CHANGELOG.md
index 711807d776024..d7e2427a4ffa9 100644
--- a/sdk/appconfiguration/azure-spring-cloud-feature-management-web/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-spring-cloud-feature-management-web/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.1.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 2.0.1 (2021-09-28)
- Updated to JUnit 5
diff --git a/sdk/appconfiguration/azure-spring-cloud-feature-management-web/pom.xml b/sdk/appconfiguration/azure-spring-cloud-feature-management-web/pom.xml
index 18a6b596750d5..63df6b797f642 100644
--- a/sdk/appconfiguration/azure-spring-cloud-feature-management-web/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-feature-management-web/pom.xml
@@ -11,7 +11,7 @@
com.azure.spring
azure-spring-cloud-feature-management-web
- 2.0.1
+ 2.1.0-beta.1
Azure Spring Cloud Feature Management Web
Adds Feature Management into Spring Web
@@ -41,7 +41,7 @@
com.azure.spring
azure-spring-cloud-feature-management
- 2.0.1
+ 2.1.0-beta.1
+ com.azure.spring:azure-spring-cloud-feature-management:[2.1.0-beta.1]
javax.servlet:javax.servlet-api:[4.0.1]
org.springframework:spring-web:[5.3.9]
org.springframework:spring-webmvc:[5.3.9]
diff --git a/sdk/appconfiguration/azure-spring-cloud-feature-management/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-feature-management/CHANGELOG.md
index c12b85e752615..04b480a8b3bbc 100644
--- a/sdk/appconfiguration/azure-spring-cloud-feature-management/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-spring-cloud-feature-management/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.1.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 2.0.1 (2021-09-28)
- Updated to JUnit 5
diff --git a/sdk/appconfiguration/azure-spring-cloud-feature-management/pom.xml b/sdk/appconfiguration/azure-spring-cloud-feature-management/pom.xml
index 9111c812b9716..1d0217614806d 100644
--- a/sdk/appconfiguration/azure-spring-cloud-feature-management/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-feature-management/pom.xml
@@ -11,7 +11,7 @@
com.azure.spring
azure-spring-cloud-feature-management
- 2.0.1
+ 2.1.0-beta.1
Azure Spring Cloud Feature Management
Adds Feature Management into Spring
@@ -39,7 +39,7 @@
io.projectreactor.netty
reactor-netty
- 1.0.10
+ 1.0.11
org.springframework.boot
@@ -72,7 +72,7 @@
com.fasterxml.jackson.core:jackson-annotations:[2.11.4]
com.fasterxml.jackson.core:jackson-databind:[2.11.4]
- io.projectreactor.netty:reactor-netty:[1.0.10]
+ io.projectreactor.netty:reactor-netty:[1.0.11]
org.springframework.boot:spring-boot-starter:[2.5.4]
org.springframework:spring-context:[5.3.9]
diff --git a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md
index bbad6fd348f3f..6acdf02a70988 100644
--- a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md
+++ b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/CHANGELOG.md
@@ -1,5 +1,15 @@
# Release History
+## 2.2.0-beta.1 (Unreleased)
+
+### Features Added
+
+### Breaking Changes
+
+### Bugs Fixed
+
+### Other Changes
+
## 2.1.1 (2021-09-28)
* Updated with latest releases of azure-spring-cloud-appconfiguration-config-web and azure-spring-cloud-feature-management.
diff --git a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml
index e4b23f1749ba3..b9fe6ce63e291 100644
--- a/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-starter-appconfiguration-config/pom.xml
@@ -11,19 +11,19 @@
com.azure.spring
azure-spring-cloud-starter-appconfiguration-config
- 2.1.1
+ 2.2.0-beta.1
Azure Spring Cloud Starter App Configuration Config
com.azure.spring
azure-spring-cloud-appconfiguration-config-web
- 2.1.1
+ 2.2.0-beta.1
com.azure.spring
azure-spring-cloud-feature-management-web
- 2.0.1
+ 2.1.0-beta.1
diff --git a/sdk/appconfiguration/azure-spring-cloud-test-appconfiguration-config/pom.xml b/sdk/appconfiguration/azure-spring-cloud-test-appconfiguration-config/pom.xml
index 68e5a9e6028de..c6eaee68712d3 100644
--- a/sdk/appconfiguration/azure-spring-cloud-test-appconfiguration-config/pom.xml
+++ b/sdk/appconfiguration/azure-spring-cloud-test-appconfiguration-config/pom.xml
@@ -24,7 +24,7 @@
com.azure.spring
azure-spring-cloud-starter-appconfiguration-config
- 2.1.1
+ 2.2.0-beta.1
com.azure.spring
diff --git a/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml b/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml
index dc2a0e5507fd1..72576340fafe3 100644
--- a/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml
+++ b/sdk/appconfiguration/spring-cloud-azure-appconfiguration-config/pom.xml
@@ -46,12 +46,12 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
org.springframework
@@ -62,7 +62,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -82,7 +82,7 @@
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
org.apache.commons
@@ -160,8 +160,8 @@
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
javax.annotation:javax.annotation-api:[1.3.2]
org.apache.commons:commons-lang3:[3.12.0]
org.apache.httpcomponents:httpclient:[4.5.13]
diff --git a/sdk/appconfiguration/spring-cloud-azure-feature-management/pom.xml b/sdk/appconfiguration/spring-cloud-azure-feature-management/pom.xml
index 48fd996ef9859..7ac4a5e6d3b93 100644
--- a/sdk/appconfiguration/spring-cloud-azure-feature-management/pom.xml
+++ b/sdk/appconfiguration/spring-cloud-azure-feature-management/pom.xml
@@ -29,17 +29,17 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
io.projectreactor.netty
reactor-netty
- 1.0.10
+ 1.0.11
junit
@@ -82,9 +82,9 @@
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
- io.projectreactor.netty:reactor-netty:[1.0.10]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
+ io.projectreactor.netty:reactor-netty:[1.0.11]
org.springframework.boot:spring-boot-starter:[2.5.4]
org.springframework:spring-context:[5.3.9]
diff --git a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
index 32bd339a722ff..de8ac898ec293 100644
--- a/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
+++ b/sdk/applicationinsights/azure-resourcemanager-applicationinsights/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/attestation/azure-resourcemanager-attestation/pom.xml b/sdk/attestation/azure-resourcemanager-attestation/pom.xml
index f9b38b82ab5be..9207c54f0a926 100644
--- a/sdk/attestation/azure-resourcemanager-attestation/pom.xml
+++ b/sdk/attestation/azure-resourcemanager-attestation/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/attestation/azure-security-attestation/pom.xml b/sdk/attestation/azure-security-attestation/pom.xml
index 0e40670f487ff..f16cfaff48718 100644
--- a/sdk/attestation/azure-security-attestation/pom.xml
+++ b/sdk/attestation/azure-security-attestation/pom.xml
@@ -45,7 +45,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.nimbusds
@@ -57,7 +57,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -81,7 +81,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/authorization/microsoft-azure-authentication-msi-token-provider/pom.xml b/sdk/authorization/microsoft-azure-authentication-msi-token-provider/pom.xml
index b6e067ccfb336..403a2ce27c9b3 100644
--- a/sdk/authorization/microsoft-azure-authentication-msi-token-provider/pom.xml
+++ b/sdk/authorization/microsoft-azure-authentication-msi-token-provider/pom.xml
@@ -112,7 +112,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/automation/azure-resourcemanager-automation/pom.xml b/sdk/automation/azure-resourcemanager-automation/pom.xml
index 29fc1f7678310..912f2aba9fa05 100644
--- a/sdk/automation/azure-resourcemanager-automation/pom.xml
+++ b/sdk/automation/azure-resourcemanager-automation/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/avs/azure-resourcemanager-avs/pom.xml b/sdk/avs/azure-resourcemanager-avs/pom.xml
index eb955953b904b..d0dd6759e02e4 100644
--- a/sdk/avs/azure-resourcemanager-avs/pom.xml
+++ b/sdk/avs/azure-resourcemanager-avs/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
index 452512cb0485c..a80bc8aa8a121 100644
--- a/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
+++ b/sdk/azurearcdata/azure-resourcemanager-azurearcdata/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
index 5a917429558c2..e047dffcda3a9 100644
--- a/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
+++ b/sdk/azurestack/azure-resourcemanager-azurestack/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
index a1d7fea077885..62db377db9be9 100644
--- a/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
+++ b/sdk/azurestackhci/azure-resourcemanager-azurestackhci/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml
index f270dbf7361c9..5926bca2c541b 100644
--- a/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml
+++ b/sdk/baremetalinfrastructure/azure-resourcemanager-baremetalinfrastructure/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/batch/azure-resourcemanager-batch/pom.xml b/sdk/batch/azure-resourcemanager-batch/pom.xml
index b36e64174875b..b6b9d42c5fbed 100644
--- a/sdk/batch/azure-resourcemanager-batch/pom.xml
+++ b/sdk/batch/azure-resourcemanager-batch/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
@@ -66,7 +66,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/batch/microsoft-azure-batch/pom.xml b/sdk/batch/microsoft-azure-batch/pom.xml
index 0e3017fc165c0..89d022e51adaa 100644
--- a/sdk/batch/microsoft-azure-batch/pom.xml
+++ b/sdk/batch/microsoft-azure-batch/pom.xml
@@ -71,7 +71,7 @@
com.fasterxml.jackson.core
jackson-core
- 2.12.4
+ 2.12.5
test
@@ -85,7 +85,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
test
diff --git a/sdk/batchai/azure-resourcemanager-batchai/pom.xml b/sdk/batchai/azure-resourcemanager-batchai/pom.xml
index f39f35f1ff0c4..c85c056d595ad 100644
--- a/sdk/batchai/azure-resourcemanager-batchai/pom.xml
+++ b/sdk/batchai/azure-resourcemanager-batchai/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/billing/azure-resourcemanager-billing/pom.xml b/sdk/billing/azure-resourcemanager-billing/pom.xml
index 1165e881875e5..3c72c1d0f0992 100644
--- a/sdk/billing/azure-resourcemanager-billing/pom.xml
+++ b/sdk/billing/azure-resourcemanager-billing/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/boms/azure-spring-boot-bom/pom.xml b/sdk/boms/azure-spring-boot-bom/pom.xml
index 18e84aa278d17..e6bef0f1323e8 100644
--- a/sdk/boms/azure-spring-boot-bom/pom.xml
+++ b/sdk/boms/azure-spring-boot-bom/pom.xml
@@ -37,17 +37,10 @@
UTF-8
${project.build.directory}
- ${project.version}
- 1.20.0
- 1.3.6
- 4.3.3
- 2.0.0
- 1.10.1
+ 2.1.0
0.0.7
- 3.1.0
+ 3.2.0
3.11.0
- 12.14.0
- 12.11.0
@@ -57,37 +50,44 @@
+
+ com.azure
+ azure-sdk-bom
+ 1.0.4
+ pom
+ import
+
com.azure.spring
azure-spring-boot
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter-active-directory
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter-active-directory-b2c
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter-cosmos
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter-keyvault-secrets
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
@@ -97,14 +97,13 @@
com.azure.spring
azure-spring-boot-starter-servicebus-jms
- ${azure.spring.boot.version}
+ ${project.version}
com.azure.spring
azure-spring-boot-starter-storage
- ${azure.spring.boot.version}
+ ${project.version}
-
com.azure
azure-spring-data-cosmos
@@ -112,53 +111,16 @@
-
- com.azure
- azure-core
- ${azure.core.version}
-
-
-
- com.azure
- azure-identity
- ${azure.identity.version}
-
-
-
- com.microsoft.azure
- msal4j
- ${azure.msal.version}
-
-
com.microsoft.azure
azure-servicebus-jms
${azure.servicebus.jms.version}
-
-
- com.azure
- azure-security-keyvault-secrets
- ${azure.keyvault.secret.version}
-
-
com.azure
azure-security-keyvault-jca
${azure.keyvault.jca.version}
-
-
- com.azure
- azure-storage-blob
- ${azure.storage.blob.version}
-
-
-
- com.azure
- azure-storage-file-share
- ${azure.storage.fileshare.version}
-
diff --git a/sdk/boms/azure-spring-cloud-dependencies/pom.xml b/sdk/boms/azure-spring-cloud-dependencies/pom.xml
index 27e4519f77957..e6ad2a2aa9420 100644
--- a/sdk/boms/azure-spring-cloud-dependencies/pom.xml
+++ b/sdk/boms/azure-spring-cloud-dependencies/pom.xml
@@ -43,97 +43,97 @@
UTF-8
${project.build.directory}
- 1.20.0
- 1.10.0
- 5.10.1
- 1.3.6
- 7.4.1
2.8.0
- 2.1.0
- 2.1.0
- 2.0.0
- ${project.version}
- 12.11.0
+ 2.1.1
+ 2.1.1
+ 2.0.1
+
+ com.azure
+ azure-sdk-bom
+ 1.0.4
+ pom
+ import
+
com.azure.spring
azure-spring-integration-eventhubs
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-integration-servicebus
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-integration-storage-queue
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-context
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-autoconfigure
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-messaging
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-stream-binder-eventhubs
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-stream-binder-servicebus-topic
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-stream-binder-servicebus-queue
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-starter-cache
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-starter-servicebus
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-starter-eventhubs
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-starter-eventhubs-kafka
- ${azure.spring.cloud.version}
+ ${project.version}
com.azure.spring
azure-spring-cloud-starter-storage-queue
- ${azure.spring.cloud.version}
+ ${project.version}
@@ -164,41 +164,11 @@
-
- com.azure
- azure-core
- ${azure.core.version}
-
-
- com.azure
- azure-identity
- ${azure.identity.version}
-
com.azure.resourcemanager
azure-resourcemanager
${azure.resourcemanager.version}
-
- com.azure
- azure-messaging-eventhubs
- ${azure.eventhubs.version}
-
-
- com.azure
- azure-messaging-eventhubs-checkpointstore-blob
- ${azure.eventhubs.checkpoint.version}
-
-
- com.azure
- azure-messaging-servicebus
- ${azure.servicebus.version}
-
-
- com.azure
- azure-storage-queue
- ${azure.storage.queue.version}
-
diff --git a/sdk/botservice/azure-resourcemanager-botservice/pom.xml b/sdk/botservice/azure-resourcemanager-botservice/pom.xml
index a416d5293a57b..7920c3e71f4e2 100644
--- a/sdk/botservice/azure-resourcemanager-botservice/pom.xml
+++ b/sdk/botservice/azure-resourcemanager-botservice/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml b/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml
index 134105d903610..a609828400433 100644
--- a/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml
+++ b/sdk/changeanalysis/azure-resourcemanager-changeanalysis/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
index 0d3be53196fce..c231fdbe708a0 100644
--- a/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
+++ b/sdk/cognitiveservices/azure-resourcemanager-cognitiveservices/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml b/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
index b65932935026a..1153e160c316f 100644
--- a/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-autosuggest/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml b/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
index 05c9ce1d1ee43..44580d015b359 100644
--- a/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-computervision/pom.xml
@@ -76,7 +76,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml b/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
index 5ced70a3a598b..3995cd7588a8b 100644
--- a/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-contentmoderator/pom.xml
@@ -76,7 +76,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
index 7e4d662024135..f18cff5daa4e1 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customimagesearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
index 08b6995f93b39..fe11cd00b9cd7 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customsearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
index 095303d3741b0..66fcd8878c512 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customvision-prediction/pom.xml
@@ -77,7 +77,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml b/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
index 666e9947d5a4b..5d4e2cc5d70aa 100644
--- a/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-customvision-training/pom.xml
@@ -76,7 +76,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
index 3dcbc4362695f..0705a5a76c6a7 100644
--- a/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-entitysearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml b/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
index 640d32084a6fb..1e334f73a21fc 100644
--- a/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-faceapi/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
index 77a64957553c9..9889be1e476b5 100644
--- a/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-imagesearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml b/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
index d5c82ef1d00fc..c68ec84557343 100644
--- a/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-luis-authoring/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml b/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
index fc8666d6e4eda..627315b6b7e74 100644
--- a/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-luis-runtime/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
index 2722e568ece71..8357daa047a30 100644
--- a/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-newssearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml b/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
index be3fb752c4f1f..bb343d326b6a4 100644
--- a/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-qnamaker/pom.xml
@@ -76,7 +76,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml b/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
index 9cf98316d406a..d19f3907ff48f 100644
--- a/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-spellcheck/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml b/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
index 76871085b2d2f..5d22e18a7964b 100644
--- a/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-textanalytics/pom.xml
@@ -76,7 +76,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
index 831f0d6a0c8f5..8a4f5bcd8f773 100644
--- a/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-videosearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
index 71b40a36820dc..822a00611bdd6 100644
--- a/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-visualsearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml b/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
index e348453c4b276..42534cba1884b 100644
--- a/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
+++ b/sdk/cognitiveservices/ms-azure-cs-websearch/pom.xml
@@ -74,7 +74,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/commerce/azure-resourcemanager-commerce/pom.xml b/sdk/commerce/azure-resourcemanager-commerce/pom.xml
index 333ba29767137..5f9f381c56f68 100644
--- a/sdk/commerce/azure-resourcemanager-commerce/pom.xml
+++ b/sdk/commerce/azure-resourcemanager-commerce/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/communication/azure-communication-callingserver/pom.xml b/sdk/communication/azure-communication-callingserver/pom.xml
index 9c4a1dd3af365..e5f99bb6e4f90 100644
--- a/sdk/communication/azure-communication-callingserver/pom.xml
+++ b/sdk/communication/azure-communication-callingserver/pom.xml
@@ -53,7 +53,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -69,7 +69,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -111,13 +111,13 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerClientBuilder.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerClientBuilder.java
index e75d24834289a..85d823dbe2b09 100644
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerClientBuilder.java
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/CallingServerClientBuilder.java
@@ -5,7 +5,6 @@
import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImpl;
import com.azure.communication.callingserver.implementation.AzureCommunicationCallingServerServiceImplBuilder;
-import com.azure.communication.callingserver.implementation.RedirectPolicy;
import com.azure.communication.common.implementation.CommunicationConnectionString;
import com.azure.communication.common.implementation.HmacAuthenticationPolicy;
import com.azure.core.annotation.ServiceClientBuilder;
@@ -19,6 +18,7 @@
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.http.policy.HttpLoggingPolicy;
import com.azure.core.http.policy.HttpPipelinePolicy;
+import com.azure.core.http.policy.RedirectPolicy;
import com.azure.core.http.policy.RequestIdPolicy;
import com.azure.core.http.policy.RetryPolicy;
import com.azure.core.http.policy.UserAgentPolicy;
@@ -27,12 +27,13 @@
import com.azure.core.util.CoreUtils;
import com.azure.core.util.logging.ClientLogger;
+import java.net.MalformedURLException;
+import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Objects;
-
/**
* Client builder that creates CallingServerAsyncClient and CallingServerClient.
*
@@ -49,6 +50,7 @@ public final class CallingServerClientBuilder {
private final ClientLogger logger = new ClientLogger(CallingServerClientBuilder.class);
private String connectionString;
private String endpoint;
+ private String hostName;
private AzureKeyCredential azureKeyCredential;
private TokenCredential tokenCredential;
private HttpClient httpClient;
@@ -252,6 +254,14 @@ private AzureCommunicationCallingServerServiceImpl createServiceImpl() {
}
Objects.requireNonNull(endpoint);
+ if (isTokenCredentialSet) {
+ try {
+ hostName = getHostNameFromEndpoint();
+ } catch (MalformedURLException e) {
+ throw logger.logExceptionAsError(new RuntimeException(e.getMessage()));
+ }
+ }
+
if (pipeline == null) {
Objects.requireNonNull(httpClient);
}
@@ -279,20 +289,25 @@ public CallingServerClientBuilder clientOptions(ClientOptions clientOptions) {
return this;
}
- private HttpPipelinePolicy createHttpPipelineAuthPolicy() {
+ private List createHttpPipelineAuthPolicies() {
if (tokenCredential != null && azureKeyCredential != null) {
throw logger.logExceptionAsError(new IllegalArgumentException(
"Both 'credential' and 'keyCredential' are set. Just one may be used."));
}
+
+ List pipelinePolicies = new ArrayList<>();
if (tokenCredential != null) {
- return new BearerTokenAuthenticationPolicy(tokenCredential,
- "https://communication.azure.com//.default");
+ pipelinePolicies.add(new BearerTokenAuthenticationPolicy(tokenCredential,
+ "https://communication.azure.com//.default"));
+ pipelinePolicies.add(new TokenCredentialAddHostHeaderPolicy(hostName));
} else if (azureKeyCredential != null) {
- return new HmacAuthenticationPolicy(azureKeyCredential);
+ pipelinePolicies.add(new HmacAuthenticationPolicy(azureKeyCredential));
} else {
throw logger.logExceptionAsError(
new IllegalArgumentException("Missing credential information while building a client."));
}
+
+ return pipelinePolicies;
}
private HttpPipeline createHttpPipeline(HttpClient httpClient) {
@@ -319,7 +334,7 @@ private HttpPipeline createHttpPipeline(HttpClient httpClient) {
policyList.add(new RequestIdPolicy());
policyList.add((retryPolicy == null) ? new RetryPolicy() : retryPolicy);
policyList.add(new RedirectPolicy());
- policyList.add(createHttpPipelineAuthPolicy());
+ policyList.addAll(createHttpPipelineAuthPolicies());
policyList.add(new CookiePolicy());
// Add additional policies
@@ -341,4 +356,8 @@ private HttpLogOptions getHttpLogOptions() {
return httpLogOptions;
}
+
+ private String getHostNameFromEndpoint() throws MalformedURLException {
+ return new URL(endpoint).getHost();
+ }
}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ServerCallAsync.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ServerCallAsync.java
index 8b8bdd4c9c5d9..234b402318449 100644
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ServerCallAsync.java
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/ServerCallAsync.java
@@ -239,9 +239,9 @@ public Mono> startRecordingWithResponse(
request.setRecordingStateCallbackUri(recordingStateCallbackUri);
if (startRecordingOptions != null) {
- request.setRecordingChannelType(startRecordingOptions.getRecordingChannelType());
- request.setRecordingContentType(startRecordingOptions.getRecordingContentType());
- request.setRecordingFormatType(startRecordingOptions.getRecordingFormatType());
+ request.setRecordingChannelType(startRecordingOptions.getRecordingChannel());
+ request.setRecordingContentType(startRecordingOptions.getRecordingContent());
+ request.setRecordingFormatType(startRecordingOptions.getRecordingFormat());
}
return withContext(contextValue -> {
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicy.java
new file mode 100644
index 0000000000000..bf24c4bf6fd94
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicy.java
@@ -0,0 +1,38 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callingserver;
+
+import com.azure.core.http.HttpPipelineCallContext;
+import com.azure.core.http.HttpPipelineNextPolicy;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+
+import reactor.core.publisher.Mono;
+
+import java.util.Objects;
+
+/**
+ * HttpPipelinePolicy to append request host headers for CallingServerClient TokenCredential requests
+ */
+public final class TokenCredentialAddHostHeaderPolicy implements HttpPipelinePolicy {
+ private static final String X_MS_HOST_HEADER = "x-ms-host";
+ private final String xMsHostValue;
+
+ /**
+ * Created with a non-null resourceHostName value
+ * @param resourceHostName Host name of the ACS resource
+ */
+ public TokenCredentialAddHostHeaderPolicy(String resourceHostName) {
+ Objects.requireNonNull(resourceHostName, "'resourceHostName' cannot be a null value.");
+ xMsHostValue = resourceHostName;
+ }
+
+ @Override
+ public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) {
+ if (!xMsHostValue.isEmpty()) {
+ context.getHttpRequest().setHeader(X_MS_HOST_HEADER, xMsHostValue);
+ }
+ return next.process();
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/RedirectPolicy.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/RedirectPolicy.java
deleted file mode 100644
index 53a763b5e069c..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/RedirectPolicy.java
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-package com.azure.communication.callingserver.implementation;
-
-import com.azure.core.http.HttpPipelineCallContext;
-import com.azure.core.http.HttpPipelineNextPolicy;
-import com.azure.core.http.HttpRequest;
-import com.azure.core.http.HttpResponse;
-import com.azure.core.http.policy.HttpPipelinePolicy;
-import com.azure.core.util.logging.ClientLogger;
-import reactor.core.publisher.Mono;
-
-import java.util.HashSet;
-import java.util.Set;
-
-/**
- * HttpPipelinePolicy to redirect requests when a redirect response (Http codes 301 or 302) is received to the
- * new location marked by the Location header.
- */
-public final class RedirectPolicy implements HttpPipelinePolicy {
- private static final int MAX_REDIRECTS = 10;
- private static final String LOCATION_HEADER_NAME = "Location";
- private static final int SC_MOVED_PERMANENTLY = 301;
- private static final int SC_MOVED_TEMPORARILY = 302;
-
- private final ClientLogger logger = new ClientLogger(RedirectPolicy.class);
-
- @Override
- public Mono process(HttpPipelineCallContext context, HttpPipelineNextPolicy next) {
- return attemptRedirection(context, next, 0, new HashSet<>());
- }
-
- private Mono attemptRedirection(HttpPipelineCallContext context, HttpPipelineNextPolicy next,
- int redirectNumber, Set attemptedRedirectLocations) {
- return next.clone().process().flatMap(httpResponse -> {
- if (isRedirectResponse(httpResponse)
- && shouldRedirect(httpResponse, context, redirectNumber, attemptedRedirectLocations)) {
- String newLocation = httpResponse.getHeaderValue(LOCATION_HEADER_NAME);
- attemptedRedirectLocations.add(newLocation);
-
- HttpRequest newRequest = context.getHttpRequest().copy();
- newRequest.setUrl(newLocation);
- context.setHttpRequest(newRequest);
-
- return attemptRedirection(context, next, redirectNumber + 1, attemptedRedirectLocations);
- }
- return Mono.just(httpResponse);
- });
- }
-
- private boolean isRedirectResponse(HttpResponse response) {
- return response.getStatusCode() == SC_MOVED_TEMPORARILY || response.getStatusCode() == SC_MOVED_PERMANENTLY;
- }
-
- private boolean shouldRedirect(HttpResponse response, HttpPipelineCallContext context, int retryCount,
- Set attemptedRedirectLocations) {
- if (retryCount > MAX_REDIRECTS) {
- logger.error(String.format("Request to %s has been redirected more than %s times.",
- context.getHttpRequest().getUrl(), MAX_REDIRECTS));
- return false;
- }
- if (attemptedRedirectLocations.contains(response.getHeaderValue(LOCATION_HEADER_NAME))) {
- logger.error(String.format("Request to %s was redirected more than once to: %s",
- context.getHttpRequest().getUrl(), response.getHeaderValue(LOCATION_HEADER_NAME)));
- return false;
- }
- return true;
- }
-
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannel.java
new file mode 100644
index 0000000000000..58363967867d4
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannel.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.implementation.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingChannel. */
+public final class RecordingChannel extends ExpandableStringEnum {
+ /** Static value mixed for RecordingChannel. */
+ public static final RecordingChannel MIXED = fromString("mixed");
+
+ /** Static value unmixed for RecordingChannel. */
+ public static final RecordingChannel UNMIXED = fromString("unmixed");
+
+ /**
+ * Creates or finds a RecordingChannel from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingChannel.
+ */
+ @JsonCreator
+ public static RecordingChannel fromString(String name) {
+ return fromString(name, RecordingChannel.class);
+ }
+
+ /** @return known RecordingChannel values. */
+ public static Collection values() {
+ return values(RecordingChannel.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelType.java
deleted file mode 100644
index 2f272fe772b70..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingChannelType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.implementation.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingChannelType. */
-public final class RecordingChannelType extends ExpandableStringEnum {
- /** Static value mixed for RecordingChannelType. */
- public static final RecordingChannelType MIXED = fromString("mixed");
-
- /** Static value unmixed for RecordingChannelType. */
- public static final RecordingChannelType UNMIXED = fromString("unmixed");
-
- /**
- * Creates or finds a RecordingChannelType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingChannelType.
- */
- @JsonCreator
- public static RecordingChannelType fromString(String name) {
- return fromString(name, RecordingChannelType.class);
- }
-
- /** @return known RecordingChannelType values. */
- public static Collection values() {
- return values(RecordingChannelType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContent.java
new file mode 100644
index 0000000000000..cb3a2a08c02b3
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContent.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.implementation.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingContent. */
+public final class RecordingContent extends ExpandableStringEnum {
+ /** Static value audio for RecordingContent. */
+ public static final RecordingContent AUDIO = fromString("audio");
+
+ /** Static value audioVideo for RecordingContent. */
+ public static final RecordingContent AUDIO_VIDEO = fromString("audioVideo");
+
+ /**
+ * Creates or finds a RecordingContent from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingContent.
+ */
+ @JsonCreator
+ public static RecordingContent fromString(String name) {
+ return fromString(name, RecordingContent.class);
+ }
+
+ /** @return known RecordingContent values. */
+ public static Collection values() {
+ return values(RecordingContent.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentType.java
deleted file mode 100644
index fd0d9d4465130..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingContentType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.implementation.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingContentType. */
-public final class RecordingContentType extends ExpandableStringEnum {
- /** Static value audio for RecordingContentType. */
- public static final RecordingContentType AUDIO = fromString("audio");
-
- /** Static value audioVideo for RecordingContentType. */
- public static final RecordingContentType AUDIO_VIDEO = fromString("audioVideo");
-
- /**
- * Creates or finds a RecordingContentType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingContentType.
- */
- @JsonCreator
- public static RecordingContentType fromString(String name) {
- return fromString(name, RecordingContentType.class);
- }
-
- /** @return known RecordingContentType values. */
- public static Collection values() {
- return values(RecordingContentType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormat.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormat.java
new file mode 100644
index 0000000000000..b9766c0c48a70
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormat.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.implementation.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingFormat. */
+public final class RecordingFormat extends ExpandableStringEnum {
+ /** Static value wav for RecordingFormat. */
+ public static final RecordingFormat WAV = fromString("wav");
+
+ /** Static value mp3 for RecordingFormat. */
+ public static final RecordingFormat MP3 = fromString("mp3");
+
+ /** Static value mp4 for RecordingFormat. */
+ public static final RecordingFormat MP4 = fromString("mp4");
+
+ /**
+ * Creates or finds a RecordingFormat from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingFormat.
+ */
+ @JsonCreator
+ public static RecordingFormat fromString(String name) {
+ return fromString(name, RecordingFormat.class);
+ }
+
+ /** @return known RecordingFormat values. */
+ public static Collection values() {
+ return values(RecordingFormat.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatType.java
deleted file mode 100644
index e5050db79ee55..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/RecordingFormatType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.implementation.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingFormatType. */
-public final class RecordingFormatType extends ExpandableStringEnum {
- /** Static value wav for RecordingFormatType. */
- public static final RecordingFormatType WAV = fromString("wav");
-
- /** Static value mp3 for RecordingFormatType. */
- public static final RecordingFormatType MP3 = fromString("mp3");
-
- /** Static value mp4 for RecordingFormatType. */
- public static final RecordingFormatType MP4 = fromString("mp4");
-
- /**
- * Creates or finds a RecordingFormatType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingFormatType.
- */
- @JsonCreator
- public static RecordingFormatType fromString(String name) {
- return fromString(name, RecordingFormatType.class);
- }
-
- /** @return known RecordingFormatType values. */
- public static Collection values() {
- return values(RecordingFormatType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequest.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequest.java
index 0398c5ba983b2..9312164687f8e 100644
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequest.java
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/implementation/models/StartCallRecordingRequest.java
@@ -4,9 +4,10 @@
package com.azure.communication.callingserver.implementation.models;
-import com.azure.communication.callingserver.models.RecordingChannelType;
-import com.azure.communication.callingserver.models.RecordingContentType;
-import com.azure.communication.callingserver.models.RecordingFormatType;
+import com.azure.communication.callingserver.models.RecordingChannel;
+import com.azure.communication.callingserver.models.RecordingContent;
+import com.azure.communication.callingserver.models.RecordingFormat;
+
import com.azure.core.annotation.Fluent;
import com.fasterxml.jackson.annotation.JsonProperty;
@@ -23,19 +24,19 @@ public final class StartCallRecordingRequest {
* Optional, audioVideo by default
*/
@JsonProperty(value = "recordingContentType")
- private RecordingContentType recordingContentType;
+ private RecordingContent recordingContentType;
/*
* Optional, mixed by default
*/
@JsonProperty(value = "recordingChannelType")
- private RecordingChannelType recordingChannelType;
+ private RecordingChannel recordingChannelType;
/*
* Optional, mp4 by default
*/
@JsonProperty(value = "recordingFormatType")
- private RecordingFormatType recordingFormatType;
+ private RecordingFormat recordingFormatType;
/**
* Get the recordingStateCallbackUri property: The uri to send notifications to.
@@ -62,7 +63,7 @@ public StartCallRecordingRequest setRecordingStateCallbackUri(String recordingSt
*
* @return the recordingContentType value.
*/
- public RecordingContentType getRecordingContentType() {
+ public RecordingContent getRecordingContentType() {
return this.recordingContentType;
}
@@ -72,7 +73,7 @@ public RecordingContentType getRecordingContentType() {
* @param recordingContentType the recordingContentType value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartCallRecordingRequest setRecordingContentType(RecordingContentType recordingContentType) {
+ public StartCallRecordingRequest setRecordingContentType(RecordingContent recordingContentType) {
this.recordingContentType = recordingContentType;
return this;
}
@@ -82,7 +83,7 @@ public StartCallRecordingRequest setRecordingContentType(RecordingContentType re
*
* @return the recordingChannelType value.
*/
- public RecordingChannelType getRecordingChannelType() {
+ public RecordingChannel getRecordingChannelType() {
return this.recordingChannelType;
}
@@ -92,7 +93,7 @@ public RecordingChannelType getRecordingChannelType() {
* @param recordingChannelType the recordingChannelType value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartCallRecordingRequest setRecordingChannelType(RecordingChannelType recordingChannelType) {
+ public StartCallRecordingRequest setRecordingChannelType(RecordingChannel recordingChannelType) {
this.recordingChannelType = recordingChannelType;
return this;
}
@@ -102,7 +103,7 @@ public StartCallRecordingRequest setRecordingChannelType(RecordingChannelType re
*
* @return the recordingFormatType value.
*/
- public RecordingFormatType getRecordingFormatType() {
+ public RecordingFormat getRecordingFormatType() {
return this.recordingFormatType;
}
@@ -112,7 +113,7 @@ public RecordingFormatType getRecordingFormatType() {
* @param recordingFormatType the recordingFormatType value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartCallRecordingRequest setRecordingFormatType(RecordingFormatType recordingFormatType) {
+ public StartCallRecordingRequest setRecordingFormatType(RecordingFormat recordingFormatType) {
this.recordingFormatType = recordingFormatType;
return this;
}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java
new file mode 100644
index 0000000000000..de5f03aff28e2
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannel.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingChannel. */
+public final class RecordingChannel extends ExpandableStringEnum {
+ /** Static value mixed for RecordingChannel. */
+ public static final RecordingChannel MIXED = fromString("mixed");
+
+ /** Static value unmixed for RecordingChannel. */
+ public static final RecordingChannel UNMIXED = fromString("unmixed");
+
+ /**
+ * Creates or finds a RecordingChannel from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingChannel.
+ */
+ @JsonCreator
+ public static RecordingChannel fromString(String name) {
+ return fromString(name, RecordingChannel.class);
+ }
+
+ /** @return known RecordingChannel values. */
+ public static Collection values() {
+ return values(RecordingChannel.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannelType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannelType.java
deleted file mode 100644
index f2d25ac85ce4a..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingChannelType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingChannelType. */
-public final class RecordingChannelType extends ExpandableStringEnum {
- /** Static value mixed for RecordingChannelType. */
- public static final RecordingChannelType MIXED = fromString("mixed");
-
- /** Static value unmixed for RecordingChannelType. */
- public static final RecordingChannelType UNMIXED = fromString("unmixed");
-
- /**
- * Creates or finds a RecordingChannelType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingChannelType.
- */
- @JsonCreator
- public static RecordingChannelType fromString(String name) {
- return fromString(name, RecordingChannelType.class);
- }
-
- /** @return known RecordingChannelType values. */
- public static Collection values() {
- return values(RecordingChannelType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java
new file mode 100644
index 0000000000000..8f8eb5ee696f8
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContent.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingContent. */
+public final class RecordingContent extends ExpandableStringEnum {
+ /** Static value audio for RecordingContent. */
+ public static final RecordingContent AUDIO = fromString("audio");
+
+ /** Static value audioVideo for RecordingContent. */
+ public static final RecordingContent AUDIO_VIDEO = fromString("audioVideo");
+
+ /**
+ * Creates or finds a RecordingContent from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingContent.
+ */
+ @JsonCreator
+ public static RecordingContent fromString(String name) {
+ return fromString(name, RecordingContent.class);
+ }
+
+ /** @return known RecordingContent values. */
+ public static Collection values() {
+ return values(RecordingContent.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContentType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContentType.java
deleted file mode 100644
index f01864592b3f9..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingContentType.java
+++ /dev/null
@@ -1,34 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingContentType. */
-public final class RecordingContentType extends ExpandableStringEnum {
- /** Static value audio for RecordingContentType. */
- public static final RecordingContentType AUDIO = fromString("audio");
-
- /** Static value audioVideo for RecordingContentType. */
- public static final RecordingContentType AUDIO_VIDEO = fromString("audioVideo");
-
- /**
- * Creates or finds a RecordingContentType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingContentType.
- */
- @JsonCreator
- public static RecordingContentType fromString(String name) {
- return fromString(name, RecordingContentType.class);
- }
-
- /** @return known RecordingContentType values. */
- public static Collection values() {
- return values(RecordingContentType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java
new file mode 100644
index 0000000000000..0f7b06ab8eda8
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormat.java
@@ -0,0 +1,37 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.communication.callingserver.models;
+
+import com.azure.core.util.ExpandableStringEnum;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.Collection;
+
+/** Defines values for RecordingFormat. */
+public final class RecordingFormat extends ExpandableStringEnum {
+ /** Static value wav for RecordingFormat. */
+ public static final RecordingFormat WAV = fromString("wav");
+
+ /** Static value mp3 for RecordingFormat. */
+ public static final RecordingFormat MP3 = fromString("mp3");
+
+ /** Static value mp4 for RecordingFormat. */
+ public static final RecordingFormat MP4 = fromString("mp4");
+
+ /**
+ * Creates or finds a RecordingFormat from its string representation.
+ *
+ * @param name a name to look for.
+ * @return the corresponding RecordingFormat.
+ */
+ @JsonCreator
+ public static RecordingFormat fromString(String name) {
+ return fromString(name, RecordingFormat.class);
+ }
+
+ /** @return known RecordingFormat values. */
+ public static Collection values() {
+ return values(RecordingFormat.class);
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormatType.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormatType.java
deleted file mode 100644
index 7fa2fe097a76e..0000000000000
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/RecordingFormatType.java
+++ /dev/null
@@ -1,37 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-// Code generated by Microsoft (R) AutoRest Code Generator.
-
-package com.azure.communication.callingserver.models;
-
-import com.azure.core.util.ExpandableStringEnum;
-import com.fasterxml.jackson.annotation.JsonCreator;
-import java.util.Collection;
-
-/** Defines values for RecordingFormatType. */
-public final class RecordingFormatType extends ExpandableStringEnum {
- /** Static value wav for RecordingFormatType. */
- public static final RecordingFormatType WAV = fromString("wav");
-
- /** Static value mp3 for RecordingFormatType. */
- public static final RecordingFormatType MP3 = fromString("mp3");
-
- /** Static value mp4 for RecordingFormatType. */
- public static final RecordingFormatType MP4 = fromString("mp4");
-
- /**
- * Creates or finds a RecordingFormatType from its string representation.
- *
- * @param name a name to look for.
- * @return the corresponding RecordingFormatType.
- */
- @JsonCreator
- public static RecordingFormatType fromString(String name) {
- return fromString(name, RecordingFormatType.class);
- }
-
- /** @return known RecordingFormatType values. */
- public static Collection values() {
- return values(RecordingFormatType.class);
- }
-}
diff --git a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java
index 85f03889a3f7d..bbda2e0c6ee99 100644
--- a/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java
+++ b/sdk/communication/azure-communication-callingserver/src/main/java/com/azure/communication/callingserver/models/StartRecordingOptions.java
@@ -10,67 +10,67 @@
@Fluent
public final class StartRecordingOptions {
- private RecordingContentType recordingContentType = null;
- private RecordingChannelType recordingChannelType = null;
- private RecordingFormatType recordingFormatType = null;
+ private RecordingContent recordingContent = null;
+ private RecordingChannel recordingChannel = null;
+ private RecordingFormat recordingFormat = null;
/**
- * Get the recordingContentType property: Optional, audioVideo by default.
+ * Get the recordingContent property: Optional, audioVideo by default.
*
- * @return the recordingContentType value.
+ * @return the recordingContent value.
*/
- public RecordingContentType getRecordingContentType() {
- return this.recordingContentType;
+ public RecordingContent getRecordingContent() {
+ return this.recordingContent;
}
/**
- * Set the recordingContentType property: Optional, audioVideo by default.
+ * Set the recordingContent property: Optional, audioVideo by default.
*
- * @param recordingContentType the recordingContentType value to set.
+ * @param recordingContent the recordingContent value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartRecordingOptions setRecordingContentType(RecordingContentType recordingContentType) {
- this.recordingContentType = recordingContentType;
+ public StartRecordingOptions setRecordingContent(RecordingContent recordingContent) {
+ this.recordingContent = recordingContent;
return this;
}
/**
- * Get the recordingChannelType property: Optional, mixed by default.
+ * Get the recordingChannel property: Optional, mixed by default.
*
- * @return the recordingChannelType value.
+ * @return the recordingChannel value.
*/
- public RecordingChannelType getRecordingChannelType() {
- return this.recordingChannelType;
+ public RecordingChannel getRecordingChannel() {
+ return this.recordingChannel;
}
/**
- * Set the recordingChannelType property: Optional, mixed by default.
+ * Set the recordingChannel property: Optional, mixed by default.
*
- * @param recordingChannelType the recordingChannelType value to set.
+ * @param recordingChannel the recordingChannel value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartRecordingOptions setRecordingChannelType(RecordingChannelType recordingChannelType) {
- this.recordingChannelType = recordingChannelType;
+ public StartRecordingOptions setRecordingChannel(RecordingChannel recordingChannel) {
+ this.recordingChannel = recordingChannel;
return this;
}
/**
- * Get the recordingFormatType property: Optional, mp4 by default.
+ * Get the recordingFormat property: Optional, mp4 by default.
*
- * @return the recordingFormatType value.
+ * @return the recordingFormat value.
*/
- public RecordingFormatType getRecordingFormatType() {
- return this.recordingFormatType;
+ public RecordingFormat getRecordingFormat() {
+ return this.recordingFormat;
}
/**
- * Set the recordingFormatType property: Optional, mp4 by default.
+ * Set the recordingFormat property: Optional, mp4 by default.
*
- * @param recordingFormatType the recordingFormatType value to set.
+ * @param recordingFormat the recordingFormat value to set.
* @return the StartCallRecordingRequest object itself.
*/
- public StartRecordingOptions setRecordingFormatType(RecordingFormatType recordingFormatType) {
- this.recordingFormatType = recordingFormatType;
+ public StartRecordingOptions setRecordingFormat(RecordingFormat recordingFormat) {
+ this.recordingFormat = recordingFormat;
return this;
}
diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ServerCallUnitTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ServerCallUnitTests.java
index 019472bbda0fb..dc2d3ab18ff93 100644
--- a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ServerCallUnitTests.java
+++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/ServerCallUnitTests.java
@@ -10,9 +10,9 @@
import java.util.Arrays;
import java.util.AbstractMap.SimpleEntry;
-import com.azure.communication.callingserver.models.RecordingChannelType;
-import com.azure.communication.callingserver.models.RecordingContentType;
-import com.azure.communication.callingserver.models.RecordingFormatType;
+import com.azure.communication.callingserver.models.RecordingChannel;
+import com.azure.communication.callingserver.models.RecordingContent;
+import com.azure.communication.callingserver.models.RecordingFormat;
import com.azure.communication.callingserver.models.StartRecordingOptions;
import com.azure.communication.callingserver.implementation.models.ResultInfoInternal;
import com.azure.communication.callingserver.models.AddParticipantResult;
@@ -47,9 +47,9 @@ public void startRecordingRelativeUriFails() {
@Test
public void startRecordingWithRecordingParamsRelativeUriFails() {
StartRecordingOptions startRecordingOptions = new StartRecordingOptions();
- startRecordingOptions.setRecordingChannelType(RecordingChannelType.MIXED);
- startRecordingOptions.setRecordingContentType(RecordingContentType.AUDIO_VIDEO);
- startRecordingOptions.setRecordingFormatType(RecordingFormatType.MP4);
+ startRecordingOptions.setRecordingChannel(RecordingChannel.MIXED);
+ startRecordingOptions.setRecordingContent(RecordingContent.AUDIO_VIDEO);
+ startRecordingOptions.setRecordingFormat(RecordingFormat.MP4);
ServerCall serverCall = new CallingServerClientBuilder()
.httpClient(new NoOpHttpClient())
@@ -105,9 +105,9 @@ public void startRecordingAsyncFails() {
@Test
public void startRecordingWithRecordingParamsAsyncFails() {
StartRecordingOptions startRecordingOptions = new StartRecordingOptions();
- startRecordingOptions.setRecordingChannelType(RecordingChannelType.MIXED);
- startRecordingOptions.setRecordingContentType(RecordingContentType.AUDIO_VIDEO);
- startRecordingOptions.setRecordingFormatType(RecordingFormatType.MP4);
+ startRecordingOptions.setRecordingChannel(RecordingChannel.MIXED);
+ startRecordingOptions.setRecordingContent(RecordingContent.AUDIO_VIDEO);
+ startRecordingOptions.setRecordingFormat(RecordingFormat.MP4);
ServerCallAsync serverCall = new CallingServerClientBuilder()
.httpClient(new NoOpHttpClient())
diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicyTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicyTests.java
new file mode 100644
index 0000000000000..ac90d0b0ad74c
--- /dev/null
+++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/TokenCredentialAddHostHeaderPolicyTests.java
@@ -0,0 +1,110 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.communication.callingserver;
+
+import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.HttpPipelineBuilder;
+import com.azure.core.http.HttpMethod;
+import com.azure.core.http.HttpRequest;
+import com.azure.core.http.HttpResponse;
+import com.azure.core.http.policy.HttpPipelinePolicy;
+import reactor.core.publisher.Mono;
+import reactor.test.StepVerifier;
+
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.net.MalformedURLException;
+import java.net.URL;
+
+public class TokenCredentialAddHostHeaderPolicyTests {
+
+ private class NoOpHttpClient implements HttpClient {
+ @Override
+ public Mono send(HttpRequest request) {
+ return Mono.empty(); // NOP
+ }
+ }
+
+ private static final String HOST_NAME = "host.communication.azure.com";
+
+ private final HttpPipelinePolicy verifyHeadersPolicy = (context, next) -> {
+ HttpRequest request = context.getHttpRequest();
+ String hostHeaderValue = request.getHeaders().getValue("x-ms-host");
+ assertEquals(HOST_NAME, hostHeaderValue);
+ return next.process();
+ };
+
+ @Test
+ public void getRequestTest() throws MalformedURLException {
+ final TokenCredentialAddHostHeaderPolicy clientPolicy = new TokenCredentialAddHostHeaderPolicy(HOST_NAME);
+
+ final HttpPipeline pipeline = new HttpPipelineBuilder()
+ .httpClient(new NoOpHttpClient())
+ .policies(clientPolicy, verifyHeadersPolicy)
+ .build();
+
+ HttpRequest request = new HttpRequest(HttpMethod.GET, new URL("https://localhost?id=b93a5ef4-f622-44d8-a80b-ff983122554e"));
+ StepVerifier.create(pipeline.send(request))
+ .verifyComplete();
+ }
+
+ @Test
+ public void postRequestTest() throws MalformedURLException {
+ final TokenCredentialAddHostHeaderPolicy clientPolicy = new TokenCredentialAddHostHeaderPolicy(HOST_NAME);
+
+ final HttpPipeline pipeline = new HttpPipelineBuilder()
+ .httpClient(new NoOpHttpClient())
+ .policies(clientPolicy, verifyHeadersPolicy)
+ .build();
+
+ HttpRequest request = new HttpRequest(HttpMethod.POST, new URL("https://localhost?id=b93a5ef4-f622-44d8-a80b-ff983122554e"));
+ StepVerifier.create(pipeline.send(request))
+ .verifyComplete();
+ }
+
+ @Test
+ public void patchRequestTest() throws MalformedURLException {
+ final TokenCredentialAddHostHeaderPolicy clientPolicy = new TokenCredentialAddHostHeaderPolicy(HOST_NAME);
+
+ final HttpPipeline pipeline = new HttpPipelineBuilder()
+ .httpClient(new NoOpHttpClient())
+ .policies(clientPolicy, verifyHeadersPolicy)
+ .build();
+
+ HttpRequest request = new HttpRequest(HttpMethod.PATCH, new URL("https://localhost?id=b93a5ef4-f622-44d8-a80b-ff983122554e"));
+ StepVerifier.create(pipeline.send(request))
+ .verifyComplete();
+ }
+
+
+ @Test
+ public void putRequestTest() throws MalformedURLException {
+ final TokenCredentialAddHostHeaderPolicy clientPolicy = new TokenCredentialAddHostHeaderPolicy(HOST_NAME);
+
+ final HttpPipeline pipeline = new HttpPipelineBuilder()
+ .httpClient(new NoOpHttpClient())
+ .policies(clientPolicy, verifyHeadersPolicy)
+ .build();
+
+ HttpRequest request = new HttpRequest(HttpMethod.PUT, new URL("https://localhost?id=b93a5ef4-f622-44d8-a80b-ff983122554e"));
+ StepVerifier.create(pipeline.send(request))
+ .verifyComplete();
+ }
+
+ @Test
+ public void deleteRequestTest() throws MalformedURLException {
+ final TokenCredentialAddHostHeaderPolicy clientPolicy = new TokenCredentialAddHostHeaderPolicy(HOST_NAME);
+
+ final HttpPipeline pipeline = new HttpPipelineBuilder()
+ .httpClient(new NoOpHttpClient())
+ .policies(clientPolicy, verifyHeadersPolicy)
+ .build();
+
+ HttpRequest request = new HttpRequest(HttpMethod.DELETE, new URL("https://localhost?id=b93a5ef4-f622-44d8-a80b-ff983122554e"));
+ StepVerifier.create(pipeline.send(request))
+ .verifyComplete();
+ }
+}
diff --git a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/implementation/RedirectPolicyTests.java b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/implementation/RedirectPolicyTests.java
index 0322ae31546ef..f1359ec9e70d6 100644
--- a/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/implementation/RedirectPolicyTests.java
+++ b/sdk/communication/azure-communication-callingserver/src/test/java/com/azure/communication/callingserver/implementation/RedirectPolicyTests.java
@@ -4,11 +4,14 @@
package com.azure.communication.callingserver.implementation;
import com.azure.core.http.HttpClient;
+import com.azure.core.http.HttpHeaders;
import com.azure.core.http.HttpMethod;
import com.azure.core.http.HttpPipeline;
import com.azure.core.http.HttpPipelineBuilder;
import com.azure.core.http.HttpRequest;
import com.azure.core.http.HttpResponse;
+import com.azure.core.http.policy.RedirectPolicy;
+import com.azure.core.test.http.MockHttpResponse;
import com.azure.core.util.Context;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
@@ -19,6 +22,8 @@
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.HashMap;
+import java.util.Map;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.CoreMatchers.is;
@@ -26,7 +31,6 @@
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer;
-import static org.mockito.Mockito.when;
public class RedirectPolicyTests {
static final String ORIGINAL_LOCATION = "https://localhost.com";
@@ -38,25 +42,24 @@ public class RedirectPolicyTests {
@Mock
HttpClient httpClient;
- @Mock
- HttpResponse response200;
-
- @Mock
- HttpResponse response302;
+ MockHttpResponse response200;
+ MockHttpResponse response302;
@BeforeEach
public void setup() throws MalformedURLException {
- MockitoAnnotations.openMocks(this);
- when(response200.getStatusCode()).thenReturn(200);
- when(response302.getStatusCode()).thenReturn(302);
- when(response302.getHeaderValue("Location")).thenReturn(REDIRECT_LOCATION);
+ Map headers = new HashMap<>();
+ headers.put("Location", REDIRECT_LOCATION);
+ HttpHeaders redirectHeaders = new HttpHeaders(headers);
+
+ MockitoAnnotations.openMocks(this);
+ request = new HttpRequest(HttpMethod.GET, new URL(ORIGINAL_LOCATION));
+ response200 = new MockHttpResponse(request, 200);
+ response302 = new MockHttpResponse(request, 302, redirectHeaders);
pipeline = new HttpPipelineBuilder()
.httpClient(httpClient)
.policies(REDIRECT_POLICY)
.build();
-
- request = new HttpRequest(HttpMethod.GET, new URL(ORIGINAL_LOCATION));
}
@Test
@@ -81,8 +84,9 @@ public void sameLocationUsedShortCircuitTest() {
}
@Test
- public void sameLocationUsedInDifferentRequestsSuccessTest() {
+ public void sameLocationUsedInDifferentRequestsSuccessTest() throws MalformedURLException {
for (int i = 0; i < 3; i++) {
+ request = new HttpRequest(HttpMethod.GET, new URL(ORIGINAL_LOCATION));
setRedirectSuccessMockResponses();
verifyCorrectness(response200);
}
diff --git a/sdk/communication/azure-communication-callingserver/swagger/README.md b/sdk/communication/azure-communication-callingserver/swagger/README.md
index f73fd1f85077c..413eb12fd1b7c 100644
--- a/sdk/communication/azure-communication-callingserver/swagger/README.md
+++ b/sdk/communication/azure-communication-callingserver/swagger/README.md
@@ -94,5 +94,32 @@ directive:
to: ResultInfoInternal
- rename-model:
from: ToneInfo
- to: ToneInfoInternal
+ to: ToneInfoInternal
```
+
+### Rename RecordingChannelType to RecordingChannel
+``` yaml
+directive:
+ - from: swagger-document
+ where: $.definitions.RecordingChannelType
+ transform: >
+ $["x-ms-enum"].name = "RecordingChannel";
+```
+
+### Rename RecordingContentType to RecordingContent
+``` yaml
+directive:
+ - from: swagger-document
+ where: $.definitions.RecordingContentType
+ transform: >
+ $["x-ms-enum"].name = "RecordingContent";
+```
+
+### Rename RecordingFormatType to RecordingFormat
+``` yaml
+directive:
+- from: swagger-document
+ where: $.definitions.RecordingFormatType["x-ms-enum"]
+ transform: >
+ $.name = "RecordingFormat";
+```
\ No newline at end of file
diff --git a/sdk/communication/azure-communication-chat/pom.xml b/sdk/communication/azure-communication-chat/pom.xml
index fc0eef257e5a2..e85b035c70636 100644
--- a/sdk/communication/azure-communication-chat/pom.xml
+++ b/sdk/communication/azure-communication-chat/pom.xml
@@ -49,7 +49,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -65,7 +65,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -95,7 +95,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-communication-common/pom.xml b/sdk/communication/azure-communication-common/pom.xml
index 9fa096017bd76..f9122fc00c1e3 100644
--- a/sdk/communication/azure-communication-common/pom.xml
+++ b/sdk/communication/azure-communication-common/pom.xml
@@ -46,12 +46,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
compile
@@ -81,7 +81,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/communication/azure-communication-identity/pom.xml b/sdk/communication/azure-communication-identity/pom.xml
index b562beb15bef6..4b2cb877ef855 100644
--- a/sdk/communication/azure-communication-identity/pom.xml
+++ b/sdk/communication/azure-communication-identity/pom.xml
@@ -62,7 +62,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -90,7 +90,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -102,7 +102,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -114,7 +114,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-communication-networktraversal/pom.xml b/sdk/communication/azure-communication-networktraversal/pom.xml
index e2e9bab2778cd..1b5ad4f1d73b2 100644
--- a/sdk/communication/azure-communication-networktraversal/pom.xml
+++ b/sdk/communication/azure-communication-networktraversal/pom.xml
@@ -60,7 +60,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -88,13 +88,13 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -106,7 +106,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-communication-phonenumbers/pom.xml b/sdk/communication/azure-communication-phonenumbers/pom.xml
index 4463b094682a3..f586c74ca0473 100644
--- a/sdk/communication/azure-communication-phonenumbers/pom.xml
+++ b/sdk/communication/azure-communication-phonenumbers/pom.xml
@@ -62,7 +62,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -90,7 +90,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -102,7 +102,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -114,7 +114,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-communication-sms/pom.xml b/sdk/communication/azure-communication-sms/pom.xml
index c961125bc17aa..8d2b0445a624c 100644
--- a/sdk/communication/azure-communication-sms/pom.xml
+++ b/sdk/communication/azure-communication-sms/pom.xml
@@ -50,7 +50,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -60,7 +60,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -90,13 +90,13 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/communication/azure-resourcemanager-communication/pom.xml b/sdk/communication/azure-resourcemanager-communication/pom.xml
index 3d2fb76e41e13..0791b7bb975ab 100644
--- a/sdk/communication/azure-resourcemanager-communication/pom.xml
+++ b/sdk/communication/azure-resourcemanager-communication/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml
index fe4186a0e02aa..72402a6373587 100644
--- a/sdk/confidentialledger/azure-security-confidentialledger/pom.xml
+++ b/sdk/confidentialledger/azure-security-confidentialledger/pom.xml
@@ -41,17 +41,17 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-experimental
- 1.0.0-beta.18
+ 1.0.0-beta.19
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
@@ -76,7 +76,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -100,7 +100,7 @@
com.azure
azure-core-serializer-json-jackson
- 1.2.7
+ 1.2.8
test
diff --git a/sdk/confluent/azure-resourcemanager-confluent/pom.xml b/sdk/confluent/azure-resourcemanager-confluent/pom.xml
index d15a25d13c5a4..fc49bd88afdc8 100644
--- a/sdk/confluent/azure-resourcemanager-confluent/pom.xml
+++ b/sdk/confluent/azure-resourcemanager-confluent/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
@@ -60,7 +60,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/consumption/azure-resourcemanager-consumption/pom.xml b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
index b108f13ce9c55..54d50cc5bebb5 100644
--- a/sdk/consumption/azure-resourcemanager-consumption/pom.xml
+++ b/sdk/consumption/azure-resourcemanager-consumption/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/containerregistry/azure-containers-containerregistry/pom.xml b/sdk/containerregistry/azure-containers-containerregistry/pom.xml
index 97c9553430b5d..92e663e0a1355 100644
--- a/sdk/containerregistry/azure-containers-containerregistry/pom.xml
+++ b/sdk/containerregistry/azure-containers-containerregistry/pom.xml
@@ -46,12 +46,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
@@ -81,19 +81,19 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/core/azure-core-amqp-experimental/pom.xml b/sdk/core/azure-core-amqp-experimental/pom.xml
index 41a0a2ee23ac1..e262cb3ca57d4 100644
--- a/sdk/core/azure-core-amqp-experimental/pom.xml
+++ b/sdk/core/azure-core-amqp-experimental/pom.xml
@@ -45,6 +45,9 @@
UTF-8
+ false
+
+
@@ -82,7 +85,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-amqp/pom.xml b/sdk/core/azure-core-amqp/pom.xml
index 82da283f9137a..e414b8dc2c5f0 100644
--- a/sdk/core/azure-core-amqp/pom.xml
+++ b/sdk/core/azure-core-amqp/pom.xml
@@ -51,6 +51,9 @@
--add-reads com.azure.core.amqp=ALL-UNNAMED
+ false
+
+
@@ -64,7 +67,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.microsoft.azure
@@ -80,7 +83,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java
index 13a6e9b40c286..dd24ed56d5ff7 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorCondition.java
@@ -64,6 +64,9 @@ public enum AmqpErrorCondition {
CONNECTION_FORCED("amqp:connection:forced"),
// These are errors that are specific to Azure services.
+ /**
+ * The server is busy.
+ */
SERVER_BUSY_ERROR("com.microsoft:server-busy"),
/**
* One or more arguments supplied to the method are invalid.
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorContext.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorContext.java
index 6bc219624af21..24c819dcea8c3 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorContext.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpErrorContext.java
@@ -26,7 +26,14 @@ public class AmqpErrorContext implements Serializable {
private static final long serialVersionUID = -2819764407122954922L;
+ /**
+ * Service namespace of the error.
+ */
private final String namespace;
+
+ /**
+ * Additional information associated with the error.
+ */
private final Map errorInfo;
/**
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpException.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpException.java
index d967ff261c991..13644fd133f73 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpException.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpException.java
@@ -20,8 +20,19 @@
public class AmqpException extends AzureException {
private static final long serialVersionUID = -3654294093967132325L;
+ /**
+ * Context that caused this AMQP error.
+ */
private final AmqpErrorContext errorContext;
+
+ /**
+ * Whether this error is transient and can be retried.
+ */
private final boolean isTransient;
+
+ /**
+ * Symbolic value indicating the error condition.
+ */
private final AmqpErrorCondition errorCondition;
/**
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpResponseCode.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpResponseCode.java
index 0c60672f30705..cb42ff4bbac0d 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpResponseCode.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/AmqpResponseCode.java
@@ -10,53 +10,194 @@
* Error response codes returned from AMQP.
*/
public enum AmqpResponseCode {
+ /**
+ * ACCEPTED.
+ */
ACCEPTED(202),
+ /**
+ * OK.
+ */
OK(200),
+ /**
+ * BAD_REQUEST.
+ */
BAD_REQUEST(400),
+ /**
+ * NOT_FOUND.
+ */
NOT_FOUND(404),
+ /**
+ * FORBIDDEN.
+ */
FORBIDDEN(403),
+ /**
+ * INTERNAL_SERVER_ERROR.
+ */
INTERNAL_SERVER_ERROR(500),
+ /**
+ * UNAUTHORIZED.
+ */
UNAUTHORIZED(401),
+ /**
+ * CONTINUE.
+ */
CONTINUE(100),
+ /**
+ * SWITCHING_PROTOCOLS.
+ */
SWITCHING_PROTOCOLS(101),
+ /**
+ * CREATED.
+ */
CREATED(201),
+ /**
+ * NON_AUTHORITATIVE_INFORMATION.
+ */
NON_AUTHORITATIVE_INFORMATION(203),
+ /**
+ * NO_CONTENT.
+ */
NO_CONTENT(204),
+ /**
+ * RESET_CONTENT.
+ */
RESET_CONTENT(205),
+ /**
+ * PARTIAL_CONTENT.
+ */
PARTIAL_CONTENT(206),
+ /**
+ * AMBIGUOUS.
+ */
AMBIGUOUS(300),
+ /**
+ * MULTIPLE_CHOICES.
+ */
MULTIPLE_CHOICES(300),
+ /**
+ * MOVED.
+ */
MOVED(301),
+ /**
+ * MOVED_PERMANENTLY.
+ */
MOVED_PERMANENTLY(301),
+ /**
+ * FOUND.
+ */
FOUND(302),
+ /**
+ * REDIRECT.
+ */
REDIRECT(302),
+ /**
+ * REDIRECT_METHOD.
+ */
REDIRECT_METHOD(303),
+ /**
+ * SEE_OTHER.
+ */
SEE_OTHER(303),
+ /**
+ * NOT_MODIFIED.
+ */
NOT_MODIFIED(304),
+ /**
+ * USE_PROXY.
+ */
USE_PROXY(305),
+ /**
+ * UNUSED.
+ */
UNUSED(306),
+ /**
+ * REDIRECT_KEEP_VERB.
+ */
REDIRECT_KEEP_VERB(307),
+ /**
+ * TEMPORARY_REDIRECT.
+ */
TEMPORARY_REDIRECT(307),
+ /**
+ * PAYMENT_REQUIRED.
+ */
PAYMENT_REQUIRED(402),
+ /**
+ * METHOD_NOT_ALLOWED.
+ */
METHOD_NOT_ALLOWED(405),
+ /**
+ * NOT_ACCEPTABLE.
+ */
NOT_ACCEPTABLE(406),
+ /**
+ * PROXY_AUTHENTICATION_REQUIRED.
+ */
PROXY_AUTHENTICATION_REQUIRED(407),
+ /**
+ * REQUEST_TIMEOUT.
+ */
REQUEST_TIMEOUT(408),
+ /**
+ * CONFLICT.
+ */
CONFLICT(409),
+ /**
+ * GONE.
+ */
GONE(410),
+ /**
+ * LENGTH_REQUIRED.
+ */
LENGTH_REQUIRED(411),
+ /**
+ * PRECONDITION_FAILED.
+ */
PRECONDITION_FAILED(412),
+ /**
+ * REQUEST_ENTITY_TOO_LARGE.
+ */
REQUEST_ENTITY_TOO_LARGE(413),
+ /**
+ * REQUEST_URI_TOO_LONG.
+ */
REQUEST_URI_TOO_LONG(414),
+ /**
+ * UNSUPPORTED_MEDIA_TYPE.
+ */
UNSUPPORTED_MEDIA_TYPE(415),
+ /**
+ * REQUESTED_RANGE_NOT_SATISFIABLE.
+ */
REQUESTED_RANGE_NOT_SATISFIABLE(416),
+ /**
+ * EXPECTATION_FAILED.
+ */
EXPECTATION_FAILED(417),
+ /**
+ * UPGRADE_REQUIRED.
+ */
UPGRADE_REQUIRED(426),
+ /**
+ * NOT_IMPLEMENTED.
+ */
NOT_IMPLEMENTED(501),
+ /**
+ * BAD_GATEWAY.
+ */
BAD_GATEWAY(502),
+ /**
+ * SERVICE_UNAVAILABLE.
+ */
SERVICE_UNAVAILABLE(503),
+ /**
+ * GATEWAY_TIMEOUT.
+ */
GATEWAY_TIMEOUT(504),
+ /**
+ * HTTP_VERSION_NOT_SUPPORTED.
+ */
HTTP_VERSION_NOT_SUPPORTED(505);
private static final Map VALUE_MAP = new HashMap<>();
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/LinkErrorContext.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/LinkErrorContext.java
index 6609beb24f979..c064325f92881 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/LinkErrorContext.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/LinkErrorContext.java
@@ -14,7 +14,14 @@
public class LinkErrorContext extends SessionErrorContext {
private static final long serialVersionUID = 2581371351997722504L;
+ /**
+ * Tracking ID for the error.
+ */
private final String trackingId;
+
+ /**
+ * Number of link credits the AMQP link had when the error occurred.
+ */
private final Integer linkCredit;
/**
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/SessionErrorContext.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/SessionErrorContext.java
index 9beda5a3d50fa..a72aa9e78092c 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/SessionErrorContext.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/exception/SessionErrorContext.java
@@ -12,6 +12,10 @@
*/
public class SessionErrorContext extends AmqpErrorContext {
private static final long serialVersionUID = -6595933736672371232L;
+
+ /**
+ * Remote endpoint the AMQP connection was connected to when the error occurred.
+ */
private final String entityPath;
/**
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpChannelProcessor.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpChannelProcessor.java
index 24d013d8ff35e..0ef34bf9672ab 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpChannelProcessor.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/AmqpChannelProcessor.java
@@ -140,7 +140,8 @@ public void onError(Throwable throwable) {
Objects.requireNonNull(throwable, "'throwable' is required.");
if (isRetryPending.get() && retryPolicy.calculateRetryDelay(throwable, retryAttempts.get()) != null) {
- logger.warning("Retry is already pending. Ignoring transient error.", throwable);
+ logger.warning("namespace[{}] entityPath[{}]: Retry is already pending. Ignoring transient error.",
+ fullyQualifiedNamespace, entityPath, throwable);
return;
}
@@ -182,22 +183,24 @@ public void onError(Throwable throwable) {
return;
}
- logger.info("Retry #{}. Transient error occurred. Retrying after {} ms.", attempts,
- retryInterval.toMillis(), throwable);
+ logger.info("namespace[{}] entityPath[{}]: Retry #{}. Transient error occurred. Retrying after {} ms.",
+ fullyQualifiedNamespace, entityPath, attempts, retryInterval.toMillis(), throwable);
retrySubscription = Mono.delay(retryInterval).subscribe(i -> {
if (isDisposed()) {
- logger.info("Retry #{}. Not requesting from upstream. Processor is disposed.", attempts);
+ logger.info("namespace[{}] entityPath[{}]: Retry #{}. Not requesting from upstream. Processor is disposed.",
+ fullyQualifiedNamespace, entityPath, attempts);
} else {
- logger.info("Retry #{}. Requesting from upstream.", attempts);
+ logger.info("namespace[{}] entityPath[{}]: Retry #{}. Requesting from upstream.",
+ fullyQualifiedNamespace, entityPath, attempts);
requestUpstream();
isRetryPending.set(false);
}
});
} else {
- logger.warning("entityPath[{}] Retry #{}. Retry attempts exhausted or exception was not retriable.",
- entityPath, attempts, throwable);
+ logger.warning("namespace[{}] entityPath[{}]: Retry #{}. Retry attempts exhausted or exception was not retriable.",
+ fullyQualifiedNamespace, entityPath, attempts, throwable);
lastError = throwable;
isDisposed.set(true);
@@ -206,8 +209,8 @@ public void onError(Throwable throwable) {
synchronized (lock) {
final ConcurrentLinkedDeque> currentSubscribers = subscribers;
subscribers = new ConcurrentLinkedDeque<>();
- logger.info("namespace[{}] entityPath[{}]: Error in AMQP channel processor. Notifying {} "
- + "subscribers.", fullyQualifiedNamespace, entityPath, currentSubscribers.size());
+ logger.info("namespace[{}] entityPath[{}]: Error in AMQP channel processor. Notifying {} subscribers.",
+ fullyQualifiedNamespace, entityPath, currentSubscribers.size());
currentSubscribers.forEach(subscriber -> subscriber.onError(throwable));
}
@@ -254,8 +257,8 @@ public void subscribe(CoreSubscriber super T> actual) {
}
subscribers.add(subscriber);
- logger.verbose("Added a subscriber {} to AMQP channel processor. Total "
- + "subscribers = {}", subscriber, subscribers.size());
+ logger.verbose("namespace[{}] entityPath[{}]: Added a subscriber {} to AMQP channel processor. Total "
+ + "subscribers = {}", fullyQualifiedNamespace, entityPath, subscriber, subscribers.size());
if (!isRetryPending.get()) {
requestUpstream();
@@ -350,7 +353,11 @@ private void close(T channel) {
}
/**
- * Represents a subscriber, waiting for an AMQP connection.
+ * Represents the decorator-subscriber wrapping a downstream subscriber to AmqpChannelProcessor.
+ * These are the subscribers waiting to receive a channel that is yet to be available in the AmqpChannelProcessor.
+ * The AmqpChannelProcessor tracks a list of such waiting subscribers; once the processor receives
+ * a result (channel, error or disposal) from it's upstream, each decorated-subscriber will be notified,
+ * which removes itself from the tracking list, then propagates the notification to the wrapped subscriber.
*/
private static final class ChannelSubscriber extends Operators.MonoSubscriber {
private final AmqpChannelProcessor processor;
@@ -362,15 +369,16 @@ private ChannelSubscriber(CoreSubscriber super T> actual, AmqpChannelProcessor
@Override
public void cancel() {
- super.cancel();
processor.subscribers.remove(this);
+ super.cancel();
}
@Override
public void onComplete() {
if (!isCancelled()) {
- actual.onComplete();
+ // first untrack before calling into external code.
processor.subscribers.remove(this);
+ actual.onComplete();
}
}
@@ -384,8 +392,8 @@ public void onNext(T channel) {
@Override
public void onError(Throwable throwable) {
if (!isCancelled()) {
- actual.onError(throwable);
processor.subscribers.remove(this);
+ actual.onError(throwable);
} else {
Operators.onErrorDropped(throwable, currentContext());
}
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
index 2c25b1729590b..acd900de38455 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorConnection.java
@@ -437,9 +437,16 @@ Mono closeAsync(AmqpShutdownSignal shutdownSignal) {
if (dispatcher != null) {
try {
dispatcher.invoke(() -> closeConnectionWork());
- } catch (IOException | RejectedExecutionException e) {
- logger.warning("connectionId[{}] Error while scheduling closeConnection work. Manually disposing.",
- connectionId, e);
+ } catch (IOException e) {
+ logger.warning("connectionId[{}] IOException while scheduling closeConnection work. Manually "
+ + "disposing.", connectionId, e);
+
+ closeConnectionWork();
+ } catch (RejectedExecutionException e) {
+ // Not logging error here again because we have to log the exception when we throw it.
+ logger.info("connectionId[{}] Could not schedule closeConnection work. Manually disposing.",
+ connectionId);
+
closeConnectionWork();
}
} else {
@@ -479,6 +486,8 @@ private synchronized void closeConnectionWork() {
final ArrayList> closingSessions = new ArrayList<>();
sessionMap.values().forEach(link -> closingSessions.add(link.isClosed()));
+ // We shouldn't need to add a timeout to this operation because executorCloseMono schedules its last
+ // remaining work after OperationTimeout has elapsed and closes afterwards.
final Mono closedExecutor = executor != null ? Mono.defer(() -> {
synchronized (this) {
logger.info("connectionId[{}] Closing executor.", connectionId);
@@ -486,11 +495,11 @@ private synchronized void closeConnectionWork() {
}
}) : Mono.empty();
- // Close all the children.
- final Mono closeSessionsMono = Mono.when(closingSessions)
+ // Close all the children and the ReactorExecutor.
+ final Mono closeSessionAndExecutorMono = Mono.when(closingSessions)
.timeout(operationTimeout)
.onErrorResume(error -> {
- logger.warning("connectionId[{}]: Timed out waiting for all sessions to close.", connectionId);
+ logger.info("connectionId[{}]: Timed out waiting for all sessions to close.", connectionId);
return Mono.empty();
})
.then(closedExecutor)
@@ -504,7 +513,7 @@ private synchronized void closeConnectionWork() {
subscriptions.dispose();
}));
- subscriptions.add(closeSessionsMono.subscribe());
+ subscriptions.add(closeSessionAndExecutorMono.subscribe());
}
private synchronized ClaimsBasedSecurityNode getOrCreateCBSNode() {
@@ -551,6 +560,9 @@ private synchronized Connection getOrCreateConnection() throws IOException {
return executor.closeAsync();
}
});
+
+ // We shouldn't need to add a timeout to this operation because executorCloseMono schedules its last
+ // remaining work after OperationTimeout has elapsed and closes afterwards.
reactorProvider.getReactorDispatcher().getShutdownSignal()
.flatMap(signal -> {
logger.info("Shutdown signal received from reactor provider.");
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorDispatcher.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorDispatcher.java
index 81048771f3e4c..3607803eba109 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorDispatcher.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorDispatcher.java
@@ -87,6 +87,15 @@ public Mono getShutdownSignal() {
return shutdownSignal.asMono();
}
+ /**
+ * Schedules work to be performed on the underlying proton-j reactor.
+ *
+ * @param work Work to be run on the underlying proton-j reactor.
+ *
+ * @throws IOException If the underlying IO pipe cannot be signalled saying that there is more work to be done.
+ * @throws RejectedExecutionException if the reactor instance has already been closed or the underlying IO Pipe
+ * has been closed.
+ */
public void invoke(final Runnable work) throws IOException {
this.throwIfSchedulerError();
@@ -94,6 +103,16 @@ public void invoke(final Runnable work) throws IOException {
this.signalWorkQueue();
}
+ /**
+ * Schedules work to be performed on the proton-j reactor after {@code delay}.
+ *
+ * @param work Work to be run on the underlying proton-j reactor.
+ * @param delay Delay before work should scheduled for execution.
+ *
+ * @throws IOException If the underlying IO pipe cannot be signalled saying that there is more work to be done.
+ * @throws RejectedExecutionException if the reactor instance has already been closed or the underlying IO Pipe
+ * has been closed.
+ */
public void invoke(final Runnable work, final Duration delay) throws IOException {
this.throwIfSchedulerError();
@@ -106,14 +125,16 @@ private void throwIfSchedulerError() {
final RejectedExecutionException rejectedException = this.reactor.attachments()
.get(RejectedExecutionException.class, RejectedExecutionException.class);
if (rejectedException != null) {
- throw logger.logExceptionAsError(new RejectedExecutionException(rejectedException.getMessage(),
- rejectedException));
+ throw logger.logExceptionAsWarning(new RejectedExecutionException(
+ "Underlying Reactor was already disposed. Should not continue dispatching work to this. "
+ + rejectedException.getMessage(), rejectedException));
}
// throw when the pipe is in closed state - in which case,
// signalling the new event-dispatch will fail
if (!this.ioSignal.sink().isOpen()) {
- throw logger.logExceptionAsError(new RejectedExecutionException("ReactorDispatcher instance is closed."));
+ throw logger.logExceptionAsWarning(new RejectedExecutionException(
+ "ReactorDispatcher instance is closed. Should not continue dispatching work to this reactor."));
}
}
@@ -203,7 +224,7 @@ public void run(Selectable selectable) {
logger.info("connectionId[{}] Reactor selectable is being disposed.", connectionId);
shutdownSignal.emitValue(new AmqpShutdownSignal(false, false,
- String.format("connectionId[%s] Reactor selectable is disposed.", connectionId)),
+ String.format("connectionId[%s] Reactor selectable is disposed.", connectionId)),
Sinks.EmitFailureHandler.FAIL_FAST);
try {
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java
index 7b47dbc5c4e62..51752e30d3655 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorExecutor.java
@@ -57,6 +57,11 @@ class ReactorExecutor implements AsyncCloseable {
* #closeAsync()} is called.
*/
void start() {
+ if (isDisposed.get()) {
+ logger.warning("Cannot start reactor when executor has been disposed.");
+ return;
+ }
+
if (hasStarted.getAndSet(true)) {
logger.warning("ReactorExecutor has already started.");
return;
@@ -139,7 +144,7 @@ private void run() {
+ "process.";
logger.info(LOG_MESSAGE, connectionId, reason);
- close(reason);
+ close(reason, true);
}
}
}
@@ -149,7 +154,7 @@ private void run() {
* Schedules the release of the current reactor after operation timeout has elapsed.
*/
private void scheduleCompletePendingTasks() {
- this.scheduler.schedule(() -> {
+ final Runnable work = () -> {
logger.info(LOG_MESSAGE, connectionId, "Processing all pending tasks and closing old reactor.");
try {
if (reactor.process()) {
@@ -169,12 +174,19 @@ private void scheduleCompletePendingTasks() {
// session before we were able to schedule this work.
}
- close("Finished processing pending tasks.");
+ close("Finished processing pending tasks.", false);
}
- }, timeout.toMillis(), TimeUnit.MILLISECONDS);
+ };
+
+ try {
+ this.scheduler.schedule(work, timeout.toMillis(), TimeUnit.MILLISECONDS);
+ } catch (RejectedExecutionException e) {
+ logger.warning("Scheduler was already closed. Manually releasing reactor.");
+ work.run();
+ }
}
- private void close(String reason) {
+ private void close(String reason, boolean initiatedByClient) {
logger.verbose("Completing close and disposing scheduler. {}", reason);
scheduler.dispose();
isClosedMono.emitEmpty((signalType, emitResult) -> {
@@ -182,7 +194,7 @@ private void close(String reason) {
emitResult);
return false;
});
- exceptionHandler.onConnectionShutdown(new AmqpShutdownSignal(false, false, reason));
+ exceptionHandler.onConnectionShutdown(new AmqpShutdownSignal(false, initiatedByClient, reason));
}
@Override
@@ -191,8 +203,12 @@ public Mono closeAsync() {
return isClosedMono.asMono();
}
+ // Pending tasks are scheduled to be invoked after the timeout period, which would complete this Mono.
if (hasStarted.get()) {
scheduleCompletePendingTasks();
+ } else {
+ // Rector never started, so just complete this Mono.
+ close("Closing based on user-invoked close operation.", true);
}
return isClosedMono.asMono();
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorReceiver.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorReceiver.java
index 0f4076fffd8c6..2f8659444b18f 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorReceiver.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorReceiver.java
@@ -93,7 +93,7 @@ protected ReactorReceiver(AmqpConnection amqpConnection, String entityPath, Rece
sink.success(message);
});
- } catch (IOException e) {
+ } catch (IOException | RejectedExecutionException e) {
sink.error(e);
}
});
@@ -186,6 +186,8 @@ public Mono addCredits(int credits) {
sink.error(new UncheckedIOException(String.format(
"connectionId[%s] linkName[%s] Unable to schedule work to add more credits.",
handler.getConnectionId(), getLinkName()), e));
+ } catch (RejectedExecutionException e) {
+ sink.error(e);
}
});
}
@@ -278,10 +280,17 @@ Mono closeAsync(String message, ErrorCondition errorCondition) {
return Mono.fromRunnable(() -> {
try {
dispatcher.invoke(closeReceiver);
- } catch (IOException | RejectedExecutionException e) {
- logger.info("connectionId[{}] linkName[{}] Could not schedule disposing of receiver on "
+ } catch (IOException e) {
+ logger.warning("connectionId[{}] linkName[{}] IO sink was closed when scheduling work. Manually "
+ + "invoking and completing close.", handler.getConnectionId(), getLinkName(), e);
+
+ closeReceiver.run();
+ completeClose();
+ } catch (RejectedExecutionException e) {
+ // Not logging error here again because we have to log the exception when we throw it.
+ logger.info("connectionId[{}] linkName[{}] RejectedExecutionException when scheduling on "
+ "ReactorDispatcher. Manually invoking and completing close.", handler.getConnectionId(),
- getLinkName(), e);
+ getLinkName());
closeReceiver.run();
completeClose();
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSender.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSender.java
index 932bb09f4f532..ab39464437190 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSender.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSender.java
@@ -403,10 +403,16 @@ Mono closeAsync(String message, ErrorCondition errorCondition) {
return Mono.fromRunnable(() -> {
try {
reactorProvider.getReactorDispatcher().invoke(closeWork);
- } catch (IOException | RejectedExecutionException e) {
- logger.info("connectionId[{}] entityPath[{}] linkName[{}]: Could not schedule close work. Running"
+ } catch (IOException e) {
+ logger.warning("connectionId[{}] entityPath[{}] linkName[{}]: Could not schedule close work. Running"
+ " manually. And completing close.", handler.getConnectionId(), entityPath, getLinkName(), e);
+ closeWork.run();
+ handleClose();
+ } catch (RejectedExecutionException e) {
+ logger.info("connectionId[{}] entityPath[{}] linkName[{}]: RejectedExecutionException scheduling close"
+ + " work. And completing close.", handler.getConnectionId(), entityPath, getLinkName());
+
closeWork.run();
handleClose();
}
@@ -624,7 +630,11 @@ private void scheduleWorkOnDispatcher() {
try {
reactorProvider.getReactorDispatcher().invoke(this::processSendWork);
} catch (IOException e) {
- logger.error("Error scheduling work on reactor.", e);
+ logger.warning("connectionId[{}] linkName[{}]: Error scheduling work on reactor.",
+ handler.getConnectionId(), getLinkName(), e);
+ } catch (RejectedExecutionException e) {
+ logger.info("connectionId[{}] linkName[{}]: Error scheduling work on reactor because of"
+ + " RejectedExecutionException.", handler.getConnectionId(), getLinkName());
}
}
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java
index 4b66bf9827f35..518c9f64e8754 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/ReactorSession.java
@@ -261,9 +261,15 @@ Mono closeAsync(String message, ErrorCondition errorCondition, boolean dis
return Mono.fromRunnable(() -> {
try {
provider.getReactorDispatcher().invoke(() -> disposeWork(errorCondition, disposeLinks));
- } catch (IOException | RejectedExecutionException e) {
+ } catch (IOException e) {
logger.info("connectionId[{}] sessionName[{}] Error while scheduling work. Manually disposing.",
sessionHandler.getConnectionId(), sessionName, e);
+
+ disposeWork(errorCondition, disposeLinks);
+ } catch (RejectedExecutionException e) {
+ logger.info("connectionId[{}] sessionName[{}] RejectedExecutionException when scheduling work.",
+ sessionHandler.getConnectionId(), sessionName);
+
disposeWork(errorCondition, disposeLinks);
}
}).then(isClosedMono.asMono());
@@ -366,7 +372,7 @@ protected Mono createConsumer(String linkName, String entityPat
sink.success(computed.getLink());
});
- } catch (IOException e) {
+ } catch (IOException | RejectedExecutionException e) {
sink.error(e);
}
}));
@@ -463,7 +469,7 @@ private Mono createProducer(String linkName, String entityPath,
sink.success(computed.getLink());
});
- } catch (IOException e) {
+ } catch (IOException | RejectedExecutionException e) {
sink.error(e);
}
}));
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java
index 9fbcff9b84fc4..ddac0dc3f8250 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/RequestResponseChannel.java
@@ -114,6 +114,8 @@ public class RequestResponseChannel implements AsyncCloseable {
* @param provider The reactor provider that the request will be sent with.
* @param senderSettleMode to set as {@link SenderSettleMode} on sender.
* @param receiverSettleMode to set as {@link ReceiverSettleMode} on receiver.
+ *
+ * @throws RuntimeException if the send/receive links could not be locally scheduled to open.
*/
protected RequestResponseChannel(AmqpConnection amqpConnection, String connectionId,
String fullyQualifiedNamespace, String linkName, String entityPath, Session session,
@@ -210,7 +212,7 @@ protected RequestResponseChannel(AmqpConnection amqpConnection, String connectio
this.sendLink.open();
this.receiveLink.open();
});
- } catch (IOException e) {
+ } catch (IOException | RejectedExecutionException e) {
throw logger.logExceptionAsError(new RuntimeException(String.format(
"connectionId[%s], linkName[%s]: Unable to open send and receive link.", connectionId, linkName), e));
}
@@ -342,7 +344,7 @@ public Mono sendWithAck(final Message message, DeliveryState deliverySt
delivery.settle();
sendLink.advance();
});
- } catch (IOException e) {
+ } catch (IOException | RejectedExecutionException e) {
sink.error(e);
}
}));
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/handler/SessionHandler.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/handler/SessionHandler.java
index 5b130500eea7d..f8a633d98d7dc 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/handler/SessionHandler.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/implementation/handler/SessionHandler.java
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.time.Duration;
import java.util.Locale;
+import java.util.concurrent.RejectedExecutionException;
public class SessionHandler extends Handler {
private final String entityName;
@@ -48,8 +49,8 @@ public void onSessionLocalOpen(Event e) {
try {
reactorDispatcher.invoke(this::onSessionTimeout, this.openTimeout);
- } catch (IOException ioException) {
- logger.warning("onSessionLocalOpen connectionId[{}], entityName[{}], reactorDispatcherError[{}]",
+ } catch (IOException | RejectedExecutionException ioException) {
+ logger.info("onSessionLocalOpen connectionId[{}], entityName[{}], reactorDispatcherError[{}]",
getConnectionId(), this.entityName,
ioException.getMessage());
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAddress.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAddress.java
index 4d2e33a2f5ef4..4ca5aecbd4aa5 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAddress.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpAddress.java
@@ -9,7 +9,14 @@
* This represents amqp address information. This will be used in populating information like 'To', 'ReplyTo' etc.
*
* Create and retrieve address
- * {@codesnippet com.azure.core.amqp.models.AmqpAddress.createAndGet}
+ *
+ *
+ * AmqpAddress amqpAddress = new AmqpAddress("my-address");
+ * // Retrieve Adderss
+ * String address = amqpAddress.toString();
+ * System.out.println("Address " + address);
+ *
+ *
*
* @see
* Address type Format.
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java
index ec49bfc335c4a..71a36b1ea1f93 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageBody.java
@@ -19,7 +19,29 @@
* corresponding to the type of the body throws exception.
*
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
*
* @see AmqpMessageBodyType
* @see
@@ -104,7 +126,29 @@ public static AmqpMessageBody fromValue(Object value) {
/**
* Gets the {@link AmqpMessageBodyType} of the message.
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
* @return AmqpBodyType type of the message.
*/
public AmqpMessageBodyType getBodyType() {
@@ -119,7 +163,29 @@ public AmqpMessageBodyType getBodyType() {
* corresponding to the type of the body throws exception.
*
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
* @return data set on {@link AmqpMessageBody}.
*
* @throws IllegalArgumentException If {@link AmqpMessageBodyType} is not {@link AmqpMessageBodyType#DATA DATA}.
@@ -142,7 +208,29 @@ public IterableStream getData() {
* corresponding to the type of the body throws exception.
*
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
* @return data set on {@link AmqpMessageBody}.
*
* @throws IllegalArgumentException If {@link AmqpMessageBodyType} is not {@link AmqpMessageBodyType#DATA DATA}.
@@ -166,7 +254,29 @@ public byte[] getFirstData() {
* corresponding to the type of the body throws exception.
*
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
* @return sequence of this {@link AmqpMessageBody} instance.
*
* @throws IllegalArgumentException If {@link AmqpMessageBodyType} is not
@@ -193,7 +303,29 @@ public List getSequence() {
* methods not corresponding to the type of the body throws exception.
*
* How to check for {@link AmqpMessageBodyType}
- * {@codesnippet com.azure.core.amqp.models.AmqpBodyType.checkBodyType}
+ *
+ *
+ * Object amqpValue;
+ * AmqpMessageBodyType bodyType = amqpAnnotatedMessage.getBody().getBodyType();
+ *
+ * switch (bodyType) {
+ * case DATA:
+ * byte[] payload = amqpAnnotatedMessage.getBody().getFirstData();
+ * System.out.println(new String(payload));
+ * break;
+ * case SEQUENCE:
+ * List<Object> sequenceData = amqpAnnotatedMessage.getBody().getSequence();
+ * sequenceData.forEach(System.out::println);
+ * break;
+ * case VALUE:
+ * amqpValue = amqpAnnotatedMessage.getBody().getValue();
+ * System.out.println(amqpValue);
+ * break;
+ * default:
+ * throw new RuntimeException(String.format(Locale.US, "Body type [%s] is not valid.", bodyType));
+ * }
+ *
+ *
* @return value of this {@link AmqpMessageBody} instance.
*
* @throws IllegalArgumentException If {@link AmqpMessageBodyType} is not {@link AmqpMessageBodyType#VALUE VALUE}.
diff --git a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageId.java b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageId.java
index 7145716328487..90239c83375e9 100644
--- a/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageId.java
+++ b/sdk/core/azure-core-amqp/src/main/java/com/azure/core/amqp/models/AmqpMessageId.java
@@ -10,7 +10,14 @@
* {@link String} representation at present.
*
* Create and retrieve message id
- * {@codesnippet com.azure.core.amqp.models.AmqpMessageId.createAndGet}
+ *
+ *
+ * AmqpMessageId messageId = new AmqpMessageId("my-message-id");
+ * // Retrieve Message id
+ * String id = messageId.toString();
+ * System.out.println("Message Id " + id);
+ *
+ *
*
* @see
* String
diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/AmqpChannelProcessorTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/AmqpChannelProcessorTest.java
index 844dd7eb69746..37f7569ae09c6 100644
--- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/AmqpChannelProcessorTest.java
+++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/AmqpChannelProcessorTest.java
@@ -190,8 +190,10 @@ public static Stream newConnectionOnRetriableError() {
@ParameterizedTest
void newConnectionOnRetriableError(Throwable exception) {
// Arrange
- final Flux publisher = createSink(connection1, connection2);
- final AmqpChannelProcessor processor = publisher.subscribeWith(channelProcessor);
+ final TestPublisher publisher = TestPublisher.createCold();
+ publisher.next(connection1);
+ publisher.next(connection2);
+ final AmqpChannelProcessor processor = publisher.flux().subscribeWith(channelProcessor);
when(retryPolicy.calculateRetryDelay(exception, 1)).thenReturn(Duration.ofSeconds(1));
when(retryPolicy.getMaxRetries()).thenReturn(3);
diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorExecutorTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorExecutorTest.java
new file mode 100644
index 0000000000000..7e342e757ce36
--- /dev/null
+++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/ReactorExecutorTest.java
@@ -0,0 +1,383 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.core.amqp.implementation;
+
+import com.azure.core.amqp.exception.AmqpException;
+import org.apache.qpid.proton.engine.Handler;
+import org.apache.qpid.proton.engine.HandlerException;
+import org.apache.qpid.proton.engine.Record;
+import org.apache.qpid.proton.reactor.Reactor;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mock;
+import org.mockito.MockitoAnnotations;
+import reactor.core.scheduler.Scheduler;
+import reactor.test.StepVerifier;
+
+import java.time.Duration;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
+
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.argThat;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.Mockito.doAnswer;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.never;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+/**
+ * Tests for {@link ReactorExecutor}.
+ */
+public class ReactorExecutorTest {
+ private static final String HOSTNAME = "test-hostname";
+ private static final String CONNECTION_ID = "connection-id";
+ private static final Duration TIMEOUT = Duration.ofSeconds(5);
+
+ @Mock
+ private Reactor reactor;
+ @Mock
+ private Scheduler scheduler;
+ @Mock
+ private AmqpExceptionHandler exceptionHandler;
+
+ private AutoCloseable mocksCloseable;
+
+ @BeforeEach
+ public void beforeEach() {
+ mocksCloseable = MockitoAnnotations.openMocks(this);
+ }
+
+ @AfterEach
+ public void afterEach() throws Exception {
+ if (mocksCloseable != null) {
+ mocksCloseable.close();
+ }
+ }
+
+ /**
+ * It only starts the reactor once.
+ */
+ @Test
+ public void startsOnce() {
+ // Arrange
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+
+ doAnswer(invocation -> {
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // Act
+ executor.start();
+
+ verify(reactor).start();
+ verify(scheduler).schedule(any(Runnable.class));
+
+ // The reactor is only started once even though invoked twice.
+ executor.start();
+
+ verify(reactor).start();
+ verify(scheduler).schedule(any(Runnable.class));
+ }
+
+ /**
+ * The closeAsync completes when the reactor has not been started.
+ */
+ @Test
+ public void closesWhenNotRun() {
+ // Arrange
+ // Scheduling pending work adds the timeout. So we'll give at most timeout *2.
+ final Duration timeout = TIMEOUT.plus(TIMEOUT);
+
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+
+ doAnswer(invocation -> {
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // Act & Verify
+ StepVerifier.create(executor.closeAsync())
+ .expectComplete()
+ .verify(timeout);
+
+ // Verify that it returns the same completed result.
+ StepVerifier.create(executor.closeAsync())
+ .expectComplete()
+ .verify(timeout);
+
+ verify(exceptionHandler).onConnectionShutdown(
+ argThat(shutdown -> !shutdown.isTransient() && shutdown.isInitiatedByClient()));
+ }
+
+ /**
+ * We cannot start running the reactor after it has been closed.
+ */
+ @Test
+ public void cannotProcessAfterClosing() {
+ // Arrange
+ // Scheduling pending work adds the timeout. So we'll give at most timeout *2.
+ final Duration timeout = TIMEOUT.plus(TIMEOUT);
+
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+ final AtomicInteger timesInvoked = new AtomicInteger();
+
+ doAnswer(invocation -> {
+ if (timesInvoked.getAndIncrement() >= 3) {
+ throw new IllegalStateException("Could not invoke runnable item. Test scheduler.");
+ }
+
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ StepVerifier.create(executor.closeAsync())
+ .expectComplete()
+ .verify(timeout);
+
+ // Act
+ executor.start();
+
+ // Assert
+ // Verify that we only scheduled the initial run work, but it stopped there.
+ verify(scheduler, never()).schedule(any(Runnable.class));
+ verify(reactor, never()).start();
+ verify(reactor, never()).process();
+
+ verify(exceptionHandler).onConnectionShutdown(
+ argThat(shutdown -> !shutdown.isTransient() && shutdown.isInitiatedByClient()));
+ }
+
+ /**
+ * Reschedules the ReactorExecutor run method until not returned has occurred.
+ */
+ @Test
+ public void reschedulesSuccessfullyThenStops() throws InterruptedException {
+ // Arrange
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+ final Semaphore semaphore = new Semaphore(1);
+ semaphore.acquire();
+
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // This is invoked when we schedule pending tasks before closing serializer.
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ semaphore.release();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class), eq(TIMEOUT.toMillis()), eq(TimeUnit.MILLISECONDS));
+
+ final AtomicInteger timesProcessed = new AtomicInteger();
+ doAnswer(invocation -> timesProcessed.getAndIncrement() < 1)
+ .when(reactor).process();
+
+ // Act
+ executor.start();
+
+ final boolean acquired = semaphore.tryAcquire(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
+ assertTrue(acquired, "Unable to stop reactor when there are no more items to process.");
+
+ // Assert
+ verify(reactor).start();
+ verify(reactor).stop();
+ verify(reactor).free();
+
+ // 1st time: success in run();
+ // 2nd time: returns false in run()
+ // 3rd time: schedulePendingTasks()
+ verify(reactor, times(3)).process();
+ verify(scheduler).dispose();
+
+ verify(exceptionHandler).onConnectionShutdown(argThat(shutdown -> {
+ return !shutdown.isTransient() && !shutdown.isInitiatedByClient();
+ }));
+ }
+
+ /**
+ * If the underlying reactor throws a HandlerException, we shut this down.
+ */
+ @Test
+ public void closesOnHandlerException() throws InterruptedException {
+ // Arrange
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+ final Semaphore semaphore = new Semaphore(1);
+ semaphore.acquire();
+
+ final HandlerException exception = new HandlerException(mock(Handler.class),
+ new UnsupportedOperationException("test-exception"));
+
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // This is invoked when we schedule pending tasks before closing serializer.
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ semaphore.release();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class), eq(TIMEOUT.toMillis()), eq(TimeUnit.MILLISECONDS));
+
+ final AtomicInteger timesProcessed = new AtomicInteger();
+ doAnswer(invocation -> {
+ if (timesProcessed.getAndIncrement() == 0) {
+ throw exception;
+ } else {
+ return false;
+ }
+ }).when(reactor).process();
+
+ // Act
+ executor.start();
+
+ final boolean acquired = semaphore.tryAcquire(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
+ assertTrue(acquired, "Unable to stop reactor when there are no more items to process.");
+
+ // Assert
+ verify(reactor).start();
+ verify(reactor).stop();
+ verify(reactor).free();
+
+ // 1st time: exception in run();
+ // 3rd time: schedulePendingTasks
+ verify(reactor, times(2)).process();
+ verify(scheduler).dispose();
+
+ verify(exceptionHandler).onConnectionError(argThat(error -> {
+ return error instanceof AmqpException && ((AmqpException) error).isTransient();
+ }));
+ verify(exceptionHandler).onConnectionShutdown(argThat(shutdown -> {
+ return !shutdown.isTransient() && !shutdown.isInitiatedByClient();
+ }));
+ }
+
+ /**
+ * If the scheduler is disposed, we cannot keep queueing work on it and it shuts down.
+ */
+ @Test
+ public void closesOnRejectedExecutionException() throws InterruptedException {
+ // Arrange
+ final Record record = mock(Record.class);
+ when(reactor.attachments()).thenReturn(record);
+
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+
+ final Semaphore semaphore = new Semaphore(1);
+ semaphore.acquire();
+
+ final AtomicBoolean firstInvocation = new AtomicBoolean(true);
+ final RejectedExecutionException exception = new RejectedExecutionException("test-rejection");
+ doAnswer(invocation -> {
+ if (firstInvocation.getAndSet(false)) {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ return null;
+ } else {
+ throw exception;
+ }
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // This is invoked when we schedule pending tasks before closing serializer.
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ semaphore.release();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class), eq(TIMEOUT.toMillis()), eq(TimeUnit.MILLISECONDS));
+
+ final AtomicInteger timesProcessed = new AtomicInteger();
+ doAnswer(invocation -> timesProcessed.getAndIncrement() == 0)
+ .when(reactor).process();
+
+ // Act
+ executor.start();
+
+ final boolean acquired = semaphore.tryAcquire(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
+ assertTrue(acquired, "Unable to stop reactor when there are no more items to process.");
+
+ // Assert
+ verify(reactor).start();
+ verify(reactor).stop();
+ verify(reactor).free();
+
+ // 1st time: exception in run();
+ // 3rd time: schedulePendingTasks
+ verify(reactor, times(2)).process();
+ verify(scheduler).dispose();
+
+ verify(record).set(eq(RejectedExecutionException.class), eq(RejectedExecutionException.class), eq(exception));
+ }
+
+ /**
+ * Reschedules the ReactorExecutor run method until not returned has occurred. But when scheduling pending tasks,
+ * an exception is thrown from the scheduler (it could have been disposed). We expect it still closes.
+ */
+ @Test
+ public void reschedulesSuccessfullyButFailsSchedulingClosingTasks() throws InterruptedException {
+ // Arrange
+ final ReactorExecutor executor = new ReactorExecutor(reactor, scheduler, CONNECTION_ID, exceptionHandler,
+ TIMEOUT, HOSTNAME);
+ final Semaphore semaphore = new Semaphore(1);
+ semaphore.acquire();
+
+ doAnswer(invocation -> {
+ final Runnable work = invocation.getArgument(0);
+ work.run();
+ return null;
+ }).when(scheduler).schedule(any(Runnable.class));
+
+ // This is invoked when we schedule pending tasks before closing serializer.
+ final RejectedExecutionException exception = new RejectedExecutionException("test-rejection");
+ doAnswer(invocation -> {
+ semaphore.release();
+ throw exception;
+ }).when(scheduler).schedule(any(Runnable.class), eq(TIMEOUT.toMillis()), eq(TimeUnit.MILLISECONDS));
+
+ final AtomicInteger timesProcessed = new AtomicInteger();
+ doAnswer(invocation -> timesProcessed.getAndIncrement() < 1)
+ .when(reactor).process();
+
+ // Act
+ executor.start();
+
+ final boolean acquired = semaphore.tryAcquire(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
+ assertTrue(acquired, "Unable to stop reactor when there are no more items to process.");
+
+ // Assert
+ verify(reactor).start();
+ verify(reactor).stop();
+ verify(reactor).free();
+
+ // 1st time: success in run();
+ // 2nd time: returns false in run()
+ // 3rd time: schedulePendingTasks()
+ verify(reactor, times(3)).process();
+ verify(scheduler).dispose();
+
+ verify(exceptionHandler).onConnectionShutdown(argThat(shutdown -> {
+ return !shutdown.isTransient() && !shutdown.isInitiatedByClient();
+ }));
+ }
+
+}
diff --git a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RetryUtilTest.java b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RetryUtilTest.java
index 3604c28277bca..aba80be90a502 100644
--- a/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RetryUtilTest.java
+++ b/sdk/core/azure-core-amqp/src/test/java/com/azure/core/amqp/implementation/RetryUtilTest.java
@@ -65,15 +65,16 @@ void getCorrectModeExponential() {
void withRetryFlux() {
// Arrange
final String timeoutMessage = "Operation timed out.";
- final Duration timeout = Duration.ofMillis(500);
+ final Duration timeout = Duration.ofMillis(1500);
final AmqpRetryOptions options = new AmqpRetryOptions()
.setDelay(Duration.ofSeconds(1))
.setMaxRetries(2)
.setTryTimeout(timeout);
- final Duration totalWaitTime = Duration.ofSeconds(options.getMaxRetries() * options.getDelay().getSeconds());
+ final Duration totalWaitTime = Duration.ofSeconds(options.getMaxRetries() * options.getDelay().getSeconds())
+ .plus(timeout);
final AtomicInteger resubscribe = new AtomicInteger();
- final Flux neverFlux = TestPublisher.create().flux()
+ final Flux neverFlux = Flux.never()
.doOnSubscribe(s -> resubscribe.incrementAndGet());
// Act & Assert
diff --git a/sdk/core/azure-core-experimental/CHANGELOG.md b/sdk/core/azure-core-experimental/CHANGELOG.md
index 6feca463ff606..6e49f7ce829c0 100644
--- a/sdk/core/azure-core-experimental/CHANGELOG.md
+++ b/sdk/core/azure-core-experimental/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.0.0-beta.19 (Unreleased)
+## 1.0.0-beta.20 (Unreleased)
### Features Added
@@ -10,6 +10,20 @@
### Other Changes
+## 1.0.0-beta.19 (2021-10-01)
+
+### Breaking Changes
+
+- Removed `TokenRequestContenxtExperimental` class that allows to configure TenantId Challenges.
+- Removed `TimeInterval` as it is no longer being developed.
+- Moved `HttpResponseError` to `azure-core` as `ResponseError`.
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+
## 1.0.0-beta.18 (2021-09-07)
### Features Added
diff --git a/sdk/core/azure-core-experimental/README.md b/sdk/core/azure-core-experimental/README.md
index b79f16288bef3..a1c75db85da8d 100644
--- a/sdk/core/azure-core-experimental/README.md
+++ b/sdk/core/azure-core-experimental/README.md
@@ -17,7 +17,7 @@ Azure Core Experimental contains types that are being evaluated and might eventu
com.azure
azure-core-experimental
- 1.0.0-beta.18
+ 1.0.0-beta.19
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-experimental/pom.xml b/sdk/core/azure-core-experimental/pom.xml
index 0910e473968e2..d3bab4511c515 100644
--- a/sdk/core/azure-core-experimental/pom.xml
+++ b/sdk/core/azure-core-experimental/pom.xml
@@ -15,7 +15,7 @@
com.azure
azure-core-experimental
jar
- 1.0.0-beta.19
+ 1.0.0-beta.20
Microsoft Azure Java Core Experimental Library
This package contains experimental core types for Azure Java clients.
@@ -51,6 +51,9 @@
--add-opens com.azure.core.experimental/com.azure.core.experimental.http=ALL-UNNAMED
--add-opens com.azure.core.experimental/com.azure.core.experimental.models=ALL-UNNAMED
+ false
+
+
@@ -64,7 +67,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
@@ -88,7 +91,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/TokenRequestContextExperimental.java b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/TokenRequestContextExperimental.java
deleted file mode 100644
index fbbccc0fbf5ce..0000000000000
--- a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/TokenRequestContextExperimental.java
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.core.experimental.credential;
-
-import com.azure.core.credential.TokenRequestContext;
-
-import java.util.List;
-
-/**
- * Contains details of a request to get a token.
- */
-public class TokenRequestContextExperimental extends TokenRequestContext {
- private String tenantId;
-
- /**
- * Creates a token request experimental instance.
- */
- public TokenRequestContextExperimental() {
- super();
- }
-
- /**
- * Set the tenant to be used in the authentication request.
- *
- * @param tenantId the tenant to be used when retrieving the token.
- * @return the updated TokenRequestContextExperimental itself
- */
- public TokenRequestContextExperimental setTenantId(String tenantId) {
- this.tenantId = tenantId;
- return this;
- }
-
- /**
- * Get the tenant to be used in the authentication request.
- *
- * @return the configured tenant id.
- */
- public String getTenantId() {
- return this.tenantId;
- }
-
- /**
- * Set the additional claims to be included in the token.
- *
- * @see
- * https://openid.net/specs/openid-connect-core-1_0-final.html#ClaimsParameter
- *
- * @param claims the additional claims to be included in the token.
- * @return the updated TokenRequestContextExperimental itself
- */
- @Override
- public TokenRequestContextExperimental setClaims(String claims) {
- super.setClaims(claims);
- return this;
- }
-
- /**
- * Sets the scopes required for the token.
- * @param scopes the scopes required for the token
- * @return the TokenRequestContextExperimental itself
- */
- @Override
- public TokenRequestContextExperimental setScopes(List scopes) {
- super.setScopes(scopes);
- return this;
- }
-
- /**
- * Adds one or more scopes to the request scopes.
- * @param scopes one or more scopes to add
- * @return the TokenRequestContextExperimental itself
- */
- public TokenRequestContextExperimental addScopes(String... scopes) {
- super.addScopes(scopes);
- return this;
- }
-}
diff --git a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/package-info.java b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/package-info.java
deleted file mode 100644
index 74214a11bf664..0000000000000
--- a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/credential/package-info.java
+++ /dev/null
@@ -1,7 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-/**
- * Package containing experimental credential classes.
- */
-package com.azure.core.experimental.credential;
diff --git a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicRequest.java b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicRequest.java
index e3bb1988feee2..86b849f9e3913 100644
--- a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicRequest.java
+++ b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicRequest.java
@@ -41,7 +41,13 @@
*
*
* Creating an instance of DynamicRequest using the constructor
- * {@codesnippet com.azure.core.experimental.http.dynamicrequest.instantiation}
+ *
+ *
+ * ObjectSerializer serializer = JsonSerializerProviders.createInstance(true);
+ * HttpPipeline pipeline = new HttpPipelineBuilder().build();
+ * DynamicRequest dynamicRequest = new DynamicRequest(serializer, pipeline);
+ *
+ *
*
* An Azure service client may provide methods that are specific to the service which returns an instance
* {@link DynamicRequest} that comes preconfigured with some request components like the endpoint, required path
@@ -52,7 +58,14 @@
* HTTP GET call
* to the pet service and setting the pet id in path param as shown in the sample below.
*
- * {@codesnippet com.azure.core.experimental.http.dynamicrequest.getrequest}
+ *
+ *
+ * DynamicResponse response = dynamicRequest
+ * .setUrl("https://petstore.example.com/pet/{petId}") // may already be set if request is created from a client
+ * .setPathParam("petId", "2343245")
+ * .send(); // makes the service call
+ *
+ *
*
* Configuring the request with JSON body and making a HTTP POST request
* To add a new pet to the pet store , a HTTP POST call should
@@ -84,11 +97,48 @@
* To create a concrete request, Json builder provided in javax package is used here for demonstration. However, any
* other Json building library can be used to achieve similar results.
*
- * {@codesnippet com.azure.core.experimental.http.dynamicrequest.createjsonrequest}
+ *
+ *
+ * JsonArray photoUrls = Json.createArrayBuilder()
+ * .add("https://imgur.com/pet1")
+ * .add("https://imgur.com/pet2")
+ * .build();
+ *
+ * JsonArray tags = Json.createArrayBuilder()
+ * .add(Json.createObjectBuilder()
+ * .add("id", 0)
+ * .add("name", "Labrador")
+ * .build())
+ * .add(Json.createObjectBuilder()
+ * .add("id", 1)
+ * .add("name", "2021")
+ * .build())
+ * .build();
+ *
+ * JsonObject requestBody = Json.createObjectBuilder()
+ * .add("id", 0)
+ * .add("name", "foo")
+ * .add("status", "available")
+ * .add("category", Json.createObjectBuilder().add("id", 0).add("name", "dog"))
+ * .add("photoUrls", photoUrls)
+ * .add("tags", tags)
+ * .build();
+ *
+ * String requestBodyStr = requestBody.toString();
+ *
+ *
*
* Now, this string representation of the JSON request can be set as body of DynamicRequest
*
- * {@codesnippet com.azure.core.experimental.http.dynamicrequest.postrequest}
+ *
+ *
+ * DynamicResponse response = dynamicRequest
+ * .setUrl("https://petstore.example.com/pet") // may already be set if request is created from a client
+ * .addHeader("Content-Type", "application/json")
+ * .setBody(requestBodyStr)
+ * .send(); // makes the service call
+ *
+ *
*/
public final class DynamicRequest {
private final ClientLogger logger = new ClientLogger(DynamicRequest.class);
diff --git a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicResponse.java b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicResponse.java
index 57f2d49e40b6e..dff7b2c7b9e33 100644
--- a/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicResponse.java
+++ b/sdk/core/azure-core-experimental/src/main/java/com/azure/core/experimental/http/DynamicResponse.java
@@ -44,7 +44,24 @@
*
* This sample shows how to read the JSON response from the service and inspecting specific properties of the response.
*
- * {@codesnippet com.azure.core.experimental.http.dynamicresponse.readresponse}
+ *
+ *
+ * DynamicResponse response = dynamicRequest
+ * .setUrl("https://petstore.example.com/pet/{petId}") // may already be set if request is created from a client
+ * .setPathParam("petId", "2343245")
+ * .send(); // makes the service call
+ *
+ * // Check the HTTP status
+ * int statusCode = response.getStatusCode();
+ * if (statusCode == 200) {
+ * BinaryData responseBody = response.getBody();
+ * String responseBodyStr = responseBody.toString();
+ * JsonObject deserialized = Json.createReader(new StringReader(responseBodyStr)).readObject();
+ * int id = deserialized.getInt("id");
+ * String firstTag = deserialized.getJsonArray("tags").get(0).asJsonObject().getString("name");
+ * }
+ *
+ *
*/
public final class DynamicResponse {
private final HttpResponse response;
diff --git a/sdk/core/azure-core-experimental/src/main/java/module-info.java b/sdk/core/azure-core-experimental/src/main/java/module-info.java
index b2398c6d57813..dbc0343a02f74 100644
--- a/sdk/core/azure-core-experimental/src/main/java/module-info.java
+++ b/sdk/core/azure-core-experimental/src/main/java/module-info.java
@@ -8,7 +8,6 @@
exports com.azure.core.experimental.implementation;
exports com.azure.core.experimental.http;
exports com.azure.core.experimental.http.policy;
- exports com.azure.core.experimental.credential;
uses com.azure.core.experimental.serializer.AvroSerializerProvider;
}
diff --git a/sdk/core/azure-core-http-jdk-httpclient/pom.xml b/sdk/core/azure-core-http-jdk-httpclient/pom.xml
index e390c535a071c..def0a33e830f2 100644
--- a/sdk/core/azure-core-http-jdk-httpclient/pom.xml
+++ b/sdk/core/azure-core-http-jdk-httpclient/pom.xml
@@ -49,6 +49,15 @@
true
+
+ --add-opens com.azure.core.http.jdk.httpclient/com.azure.core.http.jdk.httpclient=ALL-UNNAMED
+
+
+ -Djdk.httpclient.allowRestrictedHeaders=Content-Length
+
+ false
+
+
@@ -62,14 +71,14 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
test-jar
test
@@ -89,7 +98,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -181,7 +190,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
true
@@ -244,9 +253,6 @@
default-compile
-
- 11
-
+ *
+ * HttpClient client = new JdkAsyncHttpClientBuilder()
+ * .connectionTimeout(Duration.ofSeconds(250)) // connection timeout of 250 seconds
+ * .build();
+ *
+ *
*
* The default connection timeout is 60 seconds.
*
@@ -117,7 +123,17 @@ public JdkAsyncHttpClientBuilder connectionTimeout(Duration connectionTimeout) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.http.jdk.httpclient.JdkAsyncHttpClientBuilder.proxy#ProxyOptions}
+ *
+ *
+ * final String proxyHost = "<proxy-host>"; // e.g. localhost
+ * final int proxyPort = 9999; // Proxy port
+ * ProxyOptions proxyOptions = new ProxyOptions(ProxyOptions.Type.HTTP,
+ * new InetSocketAddress(proxyHost, proxyPort));
+ * HttpClient client = new JdkAsyncHttpClientBuilder()
+ * .proxy(proxyOptions)
+ * .build();
+ *
+ *
*
* @param proxyOptions The proxy configuration to use.
* @return the updated {@link JdkAsyncHttpClientBuilder} object
diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkHttpResponse.java b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkHttpResponse.java
index 76d4a091d922e..290c04c2398cb 100644
--- a/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkHttpResponse.java
+++ b/sdk/core/azure-core-http-jdk-httpclient/src/main/java/com/azure/core/http/jdk/httpclient/JdkHttpResponse.java
@@ -33,7 +33,11 @@ public Flux getBody() {
@Override
public Mono getBodyAsByteArray() {
- return FluxUtil.collectBytesFromNetworkResponse(getBody(), getHeaders());
+ return FluxUtil.collectBytesFromNetworkResponse(getBody(), getHeaders())
+ // Map empty byte[] into Mono.empty, this matches how the other HttpResponse implementations handle this.
+ .flatMap(bytes -> (bytes == null || bytes.length == 0)
+ ? Mono.empty()
+ : Mono.just(bytes));
}
@Override
diff --git a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java
index 7d14cbef787be..f22dcb6db589f 100644
--- a/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java
+++ b/sdk/core/azure-core-http-jdk-httpclient/src/test/java/com/azure/core/http/jdk/httpclient/JdkAsyncHttpClientBuilderTests.java
@@ -178,7 +178,8 @@ public void buildWithHttpProxyFromConfiguration() {
Configuration configuration = new Configuration()
.put(Configuration.PROPERTY_HTTP_PROXY,
- "http://" + proxyUserInfo + proxyEndpoint.getHost() + ":" + proxyEndpoint.getPort());
+ "http://" + proxyUserInfo + proxyEndpoint.getHost() + ":" + proxyEndpoint.getPort())
+ .put("java.net.useSystemProxies", "true");
HttpClient httpClient = new JdkAsyncHttpClientBuilder(java.net.http.HttpClient.newBuilder())
.configuration(configuration)
@@ -243,14 +244,6 @@ public void buildWithNonProxyConfigurationProxy() {
}
}
- @Test
- void testDefaultRestrictedHeaders() {
- JdkAsyncHttpClientBuilder jdkAsyncHttpClientBuilder = spy(new JdkAsyncHttpClientBuilder());
- when(jdkAsyncHttpClientBuilder.getNetworkProperties()).thenReturn(new Properties());
-
- validateRestrictedHeaders(jdkAsyncHttpClientBuilder, JdkAsyncHttpClientBuilder.DEFAULT_RESTRICTED_HEADERS, 5);
- }
-
@Test
void testAllowedHeadersFromNetworkProperties() {
JdkAsyncHttpClientBuilder jdkAsyncHttpClientBuilder = spy(new JdkAsyncHttpClientBuilder());
diff --git a/sdk/core/azure-core-http-netty/CHANGELOG.md b/sdk/core/azure-core-http-netty/CHANGELOG.md
index 5bef7d9eb0368..34897551175c7 100644
--- a/sdk/core/azure-core-http-netty/CHANGELOG.md
+++ b/sdk/core/azure-core-http-netty/CHANGELOG.md
@@ -10,6 +10,20 @@
### Other Changes
+## 1.11.1 (2021-10-01)
+
+### Bugs Fixed
+
+- Fixed a bug where `HttpResponse.close` wouldn't drain the response stream if it wasn't already consumed. ([#23855](https://github.com/Azure/azure-sdk-for-java/pull/23855))
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+- Upgraded Netty from `4.1.67.Final` to `4.1.60.Final`.
+- Upgraded Reactor Netty from `1.0.10` to `1.0.11`.
+-
## 1.11.0 (2021-09-07)
### Features Added
diff --git a/sdk/core/azure-core-http-netty/README.md b/sdk/core/azure-core-http-netty/README.md
index 7efeac18c6625..dcf392db324dc 100644
--- a/sdk/core/azure-core-http-netty/README.md
+++ b/sdk/core/azure-core-http-netty/README.md
@@ -47,7 +47,7 @@ add the direct dependency to your project as follows.
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-http-netty/pom.xml b/sdk/core/azure-core-http-netty/pom.xml
index 2c4057d7a7185..06cf4bb79e60f 100644
--- a/sdk/core/azure-core-http-netty/pom.xml
+++ b/sdk/core/azure-core-http-netty/pom.xml
@@ -51,6 +51,9 @@
--add-opens com.azure.http.netty/com.azure.core.http.netty=ALL-UNNAMED
--add-opens com.azure.http.netty/com.azure.core.http.netty.implementation=ALL-UNNAMED
+ false
+
+
@@ -64,64 +67,64 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
io.netty
netty-handler
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-handler-proxy
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-buffer
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-codec-http
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-codec-http2
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-transport-native-unix-common
- 4.1.67.Final
+ 4.1.68.Final
io.netty
netty-transport-native-epoll
- 4.1.67.Final
+ 4.1.68.Final
linux-x86_64
io.netty
netty-transport-native-kqueue
- 4.1.67.Final
+ 4.1.68.Final
osx-x86_64
io.projectreactor.netty
- reactor-netty
- 1.0.10
+ reactor-netty-http
+ 1.0.11
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
test-jar
test
@@ -141,7 +144,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -188,15 +191,15 @@
- io.netty:netty-buffer:[4.1.67.Final]
- io.netty:netty-codec-http:[4.1.67.Final]
- io.netty:netty-codec-http2:[4.1.67.Final]
- io.netty:netty-handler:[4.1.67.Final]
- io.netty:netty-handler-proxy:[4.1.67.Final]
- io.netty:netty-transport-native-unix-common:[4.1.67.Final]
- io.netty:netty-transport-native-epoll:[4.1.67.Final]
- io.projectreactor.netty:reactor-netty:[1.0.10]
- io.netty:netty-transport-native-kqueue:[4.1.67.Final]
+ io.projectreactor.netty:reactor-netty-http:[1.0.11]
+ io.netty:netty-buffer:[4.1.68.Final]
+ io.netty:netty-codec-http:[4.1.68.Final]
+ io.netty:netty-codec-http2:[4.1.68.Final]
+ io.netty:netty-handler:[4.1.68.Final]
+ io.netty:netty-handler-proxy:[4.1.68.Final]
+ io.netty:netty-transport-native-unix-common:[4.1.68.Final]
+ io.netty:netty-transport-native-epoll:[4.1.68.Final]
+ io.netty:netty-transport-native-kqueue:[4.1.68.Final]
diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java
index 4cf86fa779f5f..6d950358d19c2 100644
--- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java
+++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/NettyAsyncHttpClientBuilder.java
@@ -42,7 +42,14 @@
*
* Building a new HttpClient instance
*
- * {@codesnippet com.azure.core.http.netty.instantiation-simple}
+ *
+ *
+ * HttpClient client = new NettyAsyncHttpClientBuilder()
+ * .port(8080)
+ * .wiretap(true)
+ * .build();
+ *
+ *
*
* @see HttpClient
*/
@@ -94,7 +101,17 @@ public NettyAsyncHttpClientBuilder() {
* Creates a new builder instance, where a builder is capable of generating multiple instances of {@link HttpClient}
* based on the provided Reactor Netty HttpClient.
*
- * {@codesnippet com.azure.core.http.netty.from-existing-http-client}
+ *
+ *
+ * // Creates a reactor-netty client with netty logging enabled.
+ * reactor.netty.http.client.HttpClient baseHttpClient = reactor.netty.http.client.HttpClient.create()
+ * .wiretap(TcpClient.class.getName(), LogLevel.INFO);
+ * // Create an HttpClient based on above reactor-netty client and configure EventLoop count.
+ * HttpClient client = new NettyAsyncHttpClientBuilder(baseHttpClient)
+ * .eventLoopGroup(new NioEventLoopGroup(5))
+ * .build();
+ *
+ *
*
* @param nettyHttpClient base reactor netty HttpClient
*/
@@ -195,7 +212,23 @@ public com.azure.core.http.HttpClient build() {
*
* Code Sample
*
- * {@codesnippet com.azure.core.http.netty.NettyAsyncHttpClientBuilder.connectionProvider#ConnectionProvider}
+ *
+ *
+ * // The following creates a connection provider which will have each connection use the base name
+ * // 'myHttpConnection', has a limit of 500 concurrent connections in the connection pool, has no limit on the
+ * // number of connection requests that can be pending when all connections are in use, and removes a connection
+ * // from the pool if the connection isn't used for 60 seconds.
+ * ConnectionProvider connectionProvider = ConnectionProvider.builder("myHttpConnection")
+ * .maxConnections(500)
+ * .pendingAcquireMaxCount(-1)
+ * .maxIdleTime(Duration.ofSeconds(60))
+ * .build();
+ *
+ * HttpClient client = new NettyAsyncHttpClientBuilder()
+ * .connectionProvider(connectionProvider)
+ * .build();
+ *
+ *
*
* @param connectionProvider the connection provider
* @return the updated {@link NettyAsyncHttpClientBuilder} object.
@@ -258,7 +291,14 @@ public NettyAsyncHttpClientBuilder nioEventLoopGroup(NioEventLoopGroup nioEventL
*
* Code Samples
*
- * {@codesnippet com.azure.core.http.netty.NettyAsyncHttpClientBuilder#eventLoopGroup}
+ *
+ *
+ * int threadCount = 5;
+ * HttpClient client = new NettyAsyncHttpClientBuilder()
+ * .eventLoopGroup(new NioEventLoopGroup(threadCount))
+ * .build();
+ *
+ *
*
* @param eventLoopGroup The {@link EventLoopGroup} that will run IO loops.
* @return the updated NettyAsyncHttpClientBuilder object.
@@ -294,7 +334,19 @@ public NettyAsyncHttpClientBuilder configuration(Configuration configuration) {
* upon the return of {@code onNext()}. So, users should ensure they process the {@link ByteBuffer} immediately and
* then return.
*
- * {@codesnippet com.azure.core.http.netty.disabled-buffer-copy}
+ *
+ *
+ * HttpClient client = new NettyAsyncHttpClientBuilder()
+ * .port(8080)
+ * .disableBufferCopy(true)
+ * .build();
+ *
+ * client.send(httpRequest)
+ * .flatMapMany(response -> response.getBody())
+ * .map(byteBuffer -> completeProcessingByteBuffer(byteBuffer))
+ * .subscribe();
+ *
+ *
*
* @param disableBufferCopy If set to {@code true}, the client built from this builder will not deep-copy response
* {@link ByteBuffer ByteBuffers}.
diff --git a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyToAzureCoreHttpHeadersWrapper.java b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyToAzureCoreHttpHeadersWrapper.java
index 788d2671cdfba..b1beed6ed4502 100644
--- a/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyToAzureCoreHttpHeadersWrapper.java
+++ b/sdk/core/azure-core-http-netty/src/main/java/com/azure/core/http/netty/implementation/NettyToAzureCoreHttpHeadersWrapper.java
@@ -130,8 +130,7 @@ public Map toMap() {
return abstractMap;
}
- @Override
- public Map toMultiMap() {
+ Map toMultiMap() {
if (abstractMultiMap == null) {
abstractMultiMap = new DeferredCacheImmutableMap<>(LOGGER, new HashMap<>(), nettyHeaders,
getAll -> getAll.toArray(new String[0]));
diff --git a/sdk/core/azure-core-http-netty/src/main/java/module-info.java b/sdk/core/azure-core-http-netty/src/main/java/module-info.java
index fc90485144a29..9a3512425da32 100644
--- a/sdk/core/azure-core-http-netty/src/main/java/module-info.java
+++ b/sdk/core/azure-core-http-netty/src/main/java/module-info.java
@@ -11,7 +11,6 @@
requires io.netty.handler.proxy;
requires io.netty.resolver;
requires io.netty.transport;
- requires reactor.netty;
requires reactor.netty.core;
requires reactor.netty.http;
diff --git a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/TimeoutTestHelpers.java b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/TimeoutTestHelpers.java
index dc90c152ac2f5..e0e5ab736ba09 100644
--- a/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/TimeoutTestHelpers.java
+++ b/sdk/core/azure-core-http-netty/src/test/java/com/azure/core/http/netty/implementation/TimeoutTestHelpers.java
@@ -13,6 +13,7 @@
* {@link WriteTimeoutHandlerTests}.
*/
public class TimeoutTestHelpers {
+ @SuppressWarnings("removal")
public static Method getInvokableMethod(Object obj, String methodName, Class>... parameters) throws Exception {
Method method = obj.getClass().getDeclaredMethod(methodName, parameters);
@@ -24,6 +25,7 @@ public static Method getInvokableMethod(Object obj, String methodName, Class>.
return method;
}
+ @SuppressWarnings("removal")
public static T getFieldValue(Object obj, String fieldName, Class type)
throws Exception {
Field field = obj.getClass().getDeclaredField(fieldName);
diff --git a/sdk/core/azure-core-http-okhttp/CHANGELOG.md b/sdk/core/azure-core-http-okhttp/CHANGELOG.md
index 512438afc6f7a..859b03c09b5bf 100644
--- a/sdk/core/azure-core-http-okhttp/CHANGELOG.md
+++ b/sdk/core/azure-core-http-okhttp/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 1.7.4 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+-
## 1.7.3 (2021-09-07)
### Features Added
diff --git a/sdk/core/azure-core-http-okhttp/README.md b/sdk/core/azure-core-http-okhttp/README.md
index 851691ae08f8d..3af6f4a58b079 100644
--- a/sdk/core/azure-core-http-okhttp/README.md
+++ b/sdk/core/azure-core-http-okhttp/README.md
@@ -47,7 +47,7 @@ add the direct dependency to your project as follows.
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-http-okhttp/pom.xml b/sdk/core/azure-core-http-okhttp/pom.xml
index f8fad6eb5ac23..af47977cd4a37 100644
--- a/sdk/core/azure-core-http-okhttp/pom.xml
+++ b/sdk/core/azure-core-http-okhttp/pom.xml
@@ -51,6 +51,9 @@
--add-opens com.azure.core.http.okhttp/com.azure.core.http.okhttp=ALL-UNNAMED
--add-opens com.azure.core.http.okhttp/com.azure.core.http.okhttp.implementation=ALL-UNNAMED
+ false
+
+
@@ -64,7 +67,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
@@ -77,7 +80,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
test-jar
test
@@ -97,7 +100,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-jackson-tests/pom.xml b/sdk/core/azure-core-jackson-tests/pom.xml
index ba3099d789eed..3e50e76714d23 100644
--- a/sdk/core/azure-core-jackson-tests/pom.xml
+++ b/sdk/core/azure-core-jackson-tests/pom.xml
@@ -49,19 +49,22 @@
2.12.4
+
+
+
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
test
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
tests
test-jar
test
@@ -70,31 +73,31 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
test
com.fasterxml.jackson.core
jackson-core
- 2.12.4
+ 2.12.5
test
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
test
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
- 2.12.4
+ 2.12.5
test
com.fasterxml.jackson.dataformat
jackson-dataformat-xml
- 2.12.4
+ 2.12.5
test
@@ -119,7 +122,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -160,6 +163,28 @@
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ 0.8.7
+
+ true
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+ 3.3.1
+
+ true
+
+
+
+
+
default
diff --git a/sdk/core/azure-core-management/CHANGELOG.md b/sdk/core/azure-core-management/CHANGELOG.md
index 65ca45f8b04d8..bd45246f6abf0 100644
--- a/sdk/core/azure-core-management/CHANGELOG.md
+++ b/sdk/core/azure-core-management/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 1.4.2 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+
## 1.4.1 (2021-09-07)
### Other Changes
diff --git a/sdk/core/azure-core-management/README.md b/sdk/core/azure-core-management/README.md
index 13c331b4e8aee..0119435c95170 100644
--- a/sdk/core/azure-core-management/README.md
+++ b/sdk/core/azure-core-management/README.md
@@ -15,7 +15,7 @@ Azure Core Management library is a collection of classes common to the [Azure Re
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-management/pom.xml b/sdk/core/azure-core-management/pom.xml
index eeef26fe7eb50..23acaf972c2e3 100644
--- a/sdk/core/azure-core-management/pom.xml
+++ b/sdk/core/azure-core-management/pom.xml
@@ -49,6 +49,9 @@
--add-opens com.azure.core.management/com.azure.core.management.implementation.polling=ALL-UNNAMED
+ false
+
+
@@ -62,7 +65,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
@@ -80,7 +83,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md
index 6e0c6c5ff5710..4cc538ee963c5 100644
--- a/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md
+++ b/sdk/core/azure-core-serializer-avro-apache/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.0.0-beta.15 (Unreleased)
+## 1.0.0-beta.16 (Unreleased)
### Features Added
@@ -10,6 +10,14 @@
### Other Changes
+## 1.0.0-beta.15 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+
## 1.0.0-beta.14 (2021-09-07)
### Other Changes
diff --git a/sdk/core/azure-core-serializer-avro-apache/README.md b/sdk/core/azure-core-serializer-avro-apache/README.md
index c9813ec4f0adc..cba262c1d80a3 100644
--- a/sdk/core/azure-core-serializer-avro-apache/README.md
+++ b/sdk/core/azure-core-serializer-avro-apache/README.md
@@ -15,7 +15,7 @@ Azure Core Apache Avro Serializer is a plugin for the `azure-core` `AvroSerializ
com.azure
azure-core-serializer-avro-apache
- 1.0.0-beta.14
+ 1.0.0-beta.15
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-serializer-avro-apache/pom.xml b/sdk/core/azure-core-serializer-avro-apache/pom.xml
index 4298671cf8304..a35232acaaa0f 100644
--- a/sdk/core/azure-core-serializer-avro-apache/pom.xml
+++ b/sdk/core/azure-core-serializer-avro-apache/pom.xml
@@ -15,7 +15,7 @@
com.azure
azure-core-serializer-avro-apache
jar
- 1.0.0-beta.15
+ 1.0.0-beta.16
Microsoft Azure Apache Avro Serializer Library
This package contains the Apache Avro serializer client plugin for azure-core.
@@ -49,6 +49,9 @@
--add-exports com.azure.core.serializer.avro.apache/com.azure.core.serializer.avro.apache.generatedtestsources=org.apache.avro
--add-opens com.azure.core.serializer.avro.apache/com.azure.core.serializer.avro.apache=ALL-UNNAMED
+ false
+
+
@@ -62,12 +65,12 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
azure-core-experimental
- 1.0.0-beta.19
+ 1.0.0-beta.20
@@ -79,7 +82,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-serializer-avro-jackson/pom.xml b/sdk/core/azure-core-serializer-avro-jackson/pom.xml
index 456881ba3ecb0..6d4c2bec8d164 100644
--- a/sdk/core/azure-core-serializer-avro-jackson/pom.xml
+++ b/sdk/core/azure-core-serializer-avro-jackson/pom.xml
@@ -62,24 +62,24 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
azure-core-experimental
- 1.0.0-beta.19
+ 1.0.0-beta.20
com.fasterxml.jackson.dataformat
jackson-dataformat-avro
- 2.12.4
+ 2.12.5
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -112,7 +112,7 @@
- com.fasterxml.jackson.dataformat:jackson-dataformat-avro:[2.12.4]
+ com.fasterxml.jackson.dataformat:jackson-dataformat-avro:[2.12.5]
diff --git a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md
index 4e77482f36980..cdf484097a1e4 100644
--- a/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md
+++ b/sdk/core/azure-core-serializer-json-gson/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.1.7 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+- Upgraded `gson` from `2.8.7` to `2.8.8`.
+
## 1.1.6 (2021-09-07)
### Other Changes
diff --git a/sdk/core/azure-core-serializer-json-gson/README.md b/sdk/core/azure-core-serializer-json-gson/README.md
index 58e436152f3d3..ca7dd6ac523a2 100644
--- a/sdk/core/azure-core-serializer-json-gson/README.md
+++ b/sdk/core/azure-core-serializer-json-gson/README.md
@@ -47,7 +47,7 @@ add the direct dependency to your project as follows.
com.azure
azure-core-serializer-json-gson
- 1.1.6
+ 1.1.7
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-serializer-json-gson/pom.xml b/sdk/core/azure-core-serializer-json-gson/pom.xml
index a46716d77aafe..88047c4a61eb7 100644
--- a/sdk/core/azure-core-serializer-json-gson/pom.xml
+++ b/sdk/core/azure-core-serializer-json-gson/pom.xml
@@ -47,7 +47,11 @@
--add-opens com.azure.core.serializer.json.gson/com.azure.core.serializer.json.gson=ALL-UNNAMED
+ --add-opens com.azure.core.serializer.json.gson/com.azure.core.serializer.json.gson=com.google.gson
+ false
+
+
@@ -61,13 +65,13 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.google.code.gson
gson
- 2.8.7
+ 2.8.8
@@ -97,7 +101,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -112,7 +116,7 @@
- com.google.code.gson:gson:[2.8.7]
+ com.google.code.gson:gson:[2.8.8]
diff --git a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md
index 8a4416fc0dd0e..c12354cc256c6 100644
--- a/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md
+++ b/sdk/core/azure-core-serializer-json-jackson/CHANGELOG.md
@@ -10,6 +10,15 @@
### Other Changes
+## 1.2.8 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+- Upgraded Jackson from `2.12.4` to `2.12.5`.
+
## 1.2.7 (2021-09-07)
### Other Changes
diff --git a/sdk/core/azure-core-serializer-json-jackson/README.md b/sdk/core/azure-core-serializer-json-jackson/README.md
index 317e2c17536e1..1c9246a71f784 100644
--- a/sdk/core/azure-core-serializer-json-jackson/README.md
+++ b/sdk/core/azure-core-serializer-json-jackson/README.md
@@ -47,7 +47,7 @@ add the direct dependency to your project as follows.
com.azure
azure-core-serializer-json-jackson
- 1.2.7
+ 1.2.8
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-serializer-json-jackson/pom.xml b/sdk/core/azure-core-serializer-json-jackson/pom.xml
index d5b2b3476ea86..e39b33a2cf578 100644
--- a/sdk/core/azure-core-serializer-json-jackson/pom.xml
+++ b/sdk/core/azure-core-serializer-json-jackson/pom.xml
@@ -50,6 +50,9 @@
--add-opens com.azure.core.serializer.json.jackson/com.azure.core.serializer.json.jackson=com.fasterxml.jackson.databind
--add-opens com.azure.core.serializer.json.jackson/com.azure.core.serializer.json.jackson=ALL-UNNAMED
+ false
+
+
@@ -63,7 +66,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
@@ -93,7 +96,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/core/azure-core-serializer-json-jackson/src/test/java/com/azure/core/serializer/json/jackson/JacksonMemberNameConverterTests.java b/sdk/core/azure-core-serializer-json-jackson/src/test/java/com/azure/core/serializer/json/jackson/JacksonMemberNameConverterTests.java
index 4a8d65c720e76..c8c136771d5aa 100644
--- a/sdk/core/azure-core-serializer-json-jackson/src/test/java/com/azure/core/serializer/json/jackson/JacksonMemberNameConverterTests.java
+++ b/sdk/core/azure-core-serializer-json-jackson/src/test/java/com/azure/core/serializer/json/jackson/JacksonMemberNameConverterTests.java
@@ -268,6 +268,7 @@ public void testPropertyNameOnConstructor() {
assertNull(jacksonJsonSerializer.convertMemberName(constructors[0]));
}
+ @SuppressWarnings("removal")
@ParameterizedTest
@MethodSource("classConversionSupplier")
public void classConversion(T object, JacksonJsonSerializer converter, Set expected)
diff --git a/sdk/core/azure-core-test/CHANGELOG.md b/sdk/core/azure-core-test/CHANGELOG.md
index 75d68e3462246..85df65a4e90b6 100644
--- a/sdk/core/azure-core-test/CHANGELOG.md
+++ b/sdk/core/azure-core-test/CHANGELOG.md
@@ -10,6 +10,14 @@
### Other Changes
+## 1.7.2 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+
## 1.7.1 (2021-09-07)
### Fixed
diff --git a/sdk/core/azure-core-test/README.md b/sdk/core/azure-core-test/README.md
index e1f7f03ba5c67..eaacb3b9aa3f9 100644
--- a/sdk/core/azure-core-test/README.md
+++ b/sdk/core/azure-core-test/README.md
@@ -18,7 +18,7 @@ To use this package, add the following to your _pom.xml_.
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-test/pom.xml b/sdk/core/azure-core-test/pom.xml
index 057a655d771a6..8f580e07d6fef 100644
--- a/sdk/core/azure-core-test/pom.xml
+++ b/sdk/core/azure-core-test/pom.xml
@@ -41,19 +41,22 @@
--add-opens com.azure.core.test/com.azure.core.test.models=ALL-UNNAMED
--add-opens com.azure.core.test/com.azure.core.test.implementation=org.junit.platform.commons
+ false
+
+
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
@@ -124,7 +127,7 @@
- io.projectreactor:reactor-test:[3.4.9]
+ io.projectreactor:reactor-test:[3.4.10]
org.junit.jupiter:junit-jupiter-api:[5.7.2]
org.junit.jupiter:junit-jupiter-params:[5.7.2]
diff --git a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
index a0686b6cf2756..c5116cb2a3a63 100644
--- a/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
+++ b/sdk/core/azure-core-test/src/main/java/com/azure/core/test/TestBase.java
@@ -37,8 +37,20 @@
public abstract class TestBase implements BeforeEachCallback {
// Environment variable name used to determine the TestMode.
private static final String AZURE_TEST_HTTP_CLIENTS = "AZURE_TEST_HTTP_CLIENTS";
+
+ /**
+ * Specifies to use all HttpClient implementations in testing.
+ */
public static final String AZURE_TEST_HTTP_CLIENTS_VALUE_ALL = "ALL";
+
+ /**
+ * Specifies to use Netty HttpClient implementation in testing.
+ */
public static final String AZURE_TEST_HTTP_CLIENTS_VALUE_NETTY = "NettyAsyncHttpClient";
+
+ /**
+ * Specifies to use all service versions in testing.
+ */
public static final String AZURE_TEST_SERVICE_VERSIONS_VALUE_ALL = "ALL";
private static final Duration PLAYBACK_POLL_INTERVAL = Duration.ofMillis(1);
@@ -67,8 +79,19 @@ public abstract class TestBase implements BeforeEachCallback {
private final ClientLogger logger = new ClientLogger(TestBase.class);
+ /**
+ * {@link InterceptorManager} used for this test run.
+ */
protected InterceptorManager interceptorManager;
+
+ /**
+ * {@link TestResourceNamer} used for this test run.
+ */
protected TestResourceNamer testResourceNamer;
+
+ /**
+ * {@link TestContextManager} used for this test run.
+ */
protected TestContextManager testContextManager;
private ExtensionContext extensionContext;
diff --git a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md
index fef84c5f3817d..a9566e85328ba 100644
--- a/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md
+++ b/sdk/core/azure-core-tracing-opentelemetry/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.0.0-beta.15 (Unreleased)
+## 1.0.0-beta.16 (Unreleased)
### Features Added
@@ -10,6 +10,14 @@
### Other Changes
+## 1.0.0-beta.15 (2021-10-01)
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded `azure-core` from `1.20.0` to `1.21.0`.
+
## 1.0.0-beta.14 (2021-09-07)
### Fixed
diff --git a/sdk/core/azure-core-tracing-opentelemetry/README.md b/sdk/core/azure-core-tracing-opentelemetry/README.md
index 4246eb81449d0..7feb08ada0621 100644
--- a/sdk/core/azure-core-tracing-opentelemetry/README.md
+++ b/sdk/core/azure-core-tracing-opentelemetry/README.md
@@ -22,7 +22,7 @@ documentation][OpenTelemetry] | [Samples][samples]
com.azure
azure-core-tracing-opentelemetry
- 1.0.0-beta.14
+ 1.0.0-beta.15
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core-tracing-opentelemetry/pom.xml b/sdk/core/azure-core-tracing-opentelemetry/pom.xml
index 90e0017f39910..169ccd5a6d796 100644
--- a/sdk/core/azure-core-tracing-opentelemetry/pom.xml
+++ b/sdk/core/azure-core-tracing-opentelemetry/pom.xml
@@ -12,7 +12,7 @@
com.azure
azure-core-tracing-opentelemetry
- 1.0.0-beta.15
+ 1.0.0-beta.16
Microsoft Azure OpenTelemetry tracing plugin
This package contains the OpenTelemetry tracing plugin for Azure client libraries.
@@ -35,6 +35,9 @@
--add-opens com.azure.core.tracing.opentelemetry/com.azure.core.tracing.opentelemetry.implementation=ALL-UNNAMED
+ false
+
+
@@ -46,7 +49,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.google.code.findbugs
diff --git a/sdk/core/azure-core/CHANGELOG.md b/sdk/core/azure-core/CHANGELOG.md
index 23eead65dcff3..d08a849c7970e 100644
--- a/sdk/core/azure-core/CHANGELOG.md
+++ b/sdk/core/azure-core/CHANGELOG.md
@@ -1,6 +1,6 @@
# Release History
-## 1.21.0-beta.1 (Unreleased)
+## 1.22.0-beta.1 (Unreleased)
### Features Added
@@ -10,6 +10,29 @@
### Other Changes
+## 1.21.0 (2021-10-01)
+
+### Features Added
+
+- Added `ResponseError` which represents a general error response.
+- Added `HttpResponse.getBodyAsInputStream` to retrieve the `HttpResponse` body as an `InputStream`.
+- Added `HttpHeaders.add` to add an individual header to the `HttpHeaders`.
+- Added `setTenantId` and `getTenantId` methods to `TokenRequestContext` class that allows to configure TenantId Challenges.
+- Added additional logging when an `HttpClientProvider` is loaded from the classpath.
+
+### Breaking Changes
+
+- Deprecated annotation `ResumeOperation` as it was no longer used.
+- Deprecated `JacksonAdapter.simpleMapper` and `JacksonAdapter.serializer` as they should no longer be used.
+- Deprecated `CoreUtils.extractAndFetch` as it was no longer used.
+
+### Other Changes
+
+#### Dependency Updates
+
+- Upgraded Jackson from `2.12.4` to `2.12.5`.
+- Upgraded Reactor from `3.4.9` to `3.4.10`.
+
## 1.20.0 (2021-09-07)
### Features Added
diff --git a/sdk/core/azure-core/README.md b/sdk/core/azure-core/README.md
index f5b3ca25bbc29..bf738bca02029 100644
--- a/sdk/core/azure-core/README.md
+++ b/sdk/core/azure-core/README.md
@@ -58,7 +58,7 @@ add the direct dependency to your project as follows.
com.azure
azure-core
- 1.20.0
+ 1.21.0
```
[//]: # ({x-version-update-end})
diff --git a/sdk/core/azure-core/pom.xml b/sdk/core/azure-core/pom.xml
index 4ab2a8054a639..a27eaddc01963 100644
--- a/sdk/core/azure-core/pom.xml
+++ b/sdk/core/azure-core/pom.xml
@@ -15,7 +15,7 @@
com.azure
azure-core
jar
- 1.21.0-beta.1
+ 1.22.0-beta.1
Microsoft Azure Java Core Library
This package contains core types for Azure Java clients.
@@ -72,6 +72,9 @@
--add-reads com.azure.core=ALL-UNNAMED
+ false
+
+
@@ -85,27 +88,27 @@
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-core
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.dataformat
jackson-dataformat-xml
- 2.12.4
+ 2.12.5
org.slf4j
@@ -126,18 +129,18 @@
io.projectreactor
reactor-core
- 3.4.9
+ 3.4.10
io.netty
netty-tcnative-boringssl-static
- 2.0.40.Final
+ 2.0.43.Final
${boring-ssl-classifier}
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -233,13 +236,13 @@
- io.netty:netty-tcnative-boringssl-static:[2.0.40.Final]
- io.projectreactor:reactor-core:[3.4.9]
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
- com.fasterxml.jackson.core:jackson-core:[2.12.4]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
- com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.12.4]
- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.4]
+ io.netty:netty-tcnative-boringssl-static:[2.0.43.Final]
+ io.projectreactor:reactor-core:[3.4.10]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
+ com.fasterxml.jackson.core:jackson-core:[2.12.5]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
+ com.fasterxml.jackson.dataformat:jackson-dataformat-xml:[2.12.5]
+ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.5]
org.slf4j:slf4j-api:[1.7.32]
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ReturnType.java b/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ReturnType.java
index 08f5e5425de1a..b4bb32673e96b 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ReturnType.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ReturnType.java
@@ -8,7 +8,18 @@
* method is expected to return a single item or a collection
*/
public enum ReturnType {
+ /**
+ * Single value return type.
+ */
SINGLE,
+
+ /**
+ * Simple collection, enumeration, return type.
+ */
COLLECTION,
+
+ /**
+ * Long-running operation return type.
+ */
LONG_RUNNING_OPERATION
}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ServiceClientProtocol.java b/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ServiceClientProtocol.java
index dda22157cf4ab..581a9d3e12d8b 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ServiceClientProtocol.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/annotation/ServiceClientProtocol.java
@@ -8,6 +8,13 @@
* {@link ServiceClientBuilder} annotation.
*/
public enum ServiceClientProtocol {
+ /**
+ * HTTP protocol.
+ */
HTTP,
- AMQP;
+
+ /**
+ * AMQP protocol.
+ */
+ AMQP
}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credential/AzureNamedKeyCredential.java b/sdk/core/azure-core/src/main/java/com/azure/core/credential/AzureNamedKeyCredential.java
index c1a12d83e8f8b..f9d810d48562d 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/credential/AzureNamedKeyCredential.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/credential/AzureNamedKeyCredential.java
@@ -16,7 +16,12 @@
*
* Create a named credential for a service specific sas key.
*
- * {@codesnippet com.azure.core.credential.azureNamedKeyCredenialSasKey}
+ *
+ *
+ * AzureNamedKeyCredential azureNamedKeyCredential =
+ * new AzureNamedKeyCredential("AZURE-SERVICE-SAS-KEY-NAME", "AZURE-SERVICE-SAS-KEY");
+ *
+ *
*
*/
public final class AzureNamedKeyCredential {
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java
index f14ddfe8bd76a..9a1a3498094af 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/credential/TokenRequestContext.java
@@ -14,6 +14,7 @@
public class TokenRequestContext {
private final List scopes;
private String claims;
+ private String tenantId;
/**
* Creates a token request instance.
@@ -77,4 +78,24 @@ public TokenRequestContext setClaims(String claims) {
public String getClaims() {
return this.claims;
}
+
+ /**
+ * Set the tenant id to be used for the authentication request.
+ *
+ * @param tenantId the tenant to be used when requesting the token.
+ * @return the updated TokenRequestContext itself
+ */
+ public TokenRequestContext setTenantId(String tenantId) {
+ this.tenantId = tenantId;
+ return this;
+ }
+
+ /**
+ * Get the tenant id to be used for the authentication request.
+ *
+ * @return the configured tenant id.
+ */
+ public String getTenantId() {
+ return this.tenantId;
+ }
}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/exception/UnexpectedLengthException.java b/sdk/core/azure-core/src/main/java/com/azure/core/exception/UnexpectedLengthException.java
index 63414b2656849..890887d6d5c7f 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/exception/UnexpectedLengthException.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/exception/UnexpectedLengthException.java
@@ -7,7 +7,14 @@
* This exception class represents an error when the specified input length doesn't match the data length.
*/
public final class UnexpectedLengthException extends IllegalStateException {
+ /**
+ * Number of bytes read from the input.
+ */
private final long bytesRead;
+
+ /**
+ * Number of bytes that were expected to be read from the input.
+ */
private final long bytesExpected;
/**
@@ -23,6 +30,8 @@ public UnexpectedLengthException(String message, long bytesRead, long bytesExpec
}
/**
+ * Gets the number of bytes read from the input.
+ *
* @return the number of bytes read from the input
*/
public long getBytesRead() {
@@ -30,6 +39,8 @@ public long getBytesRead() {
}
/**
+ * Gets the number of bytes that were expected to be read from the input.
+ *
* @return the number of bytes that were expected to be read from the input
*/
public long getBytesExpected() {
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java
index 664f7fa4d5e46..c9f1e0d9fb0e6 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpHeaders.java
@@ -250,7 +250,7 @@ public Map toMap() {
*
* @return the headers in a copied and unmodifiable form.
*/
- public Map toMultiMap() {
+ Map toMultiMap() {
final Map result = new HashMap<>();
for (final HttpHeader header : headers.values()) {
result.put(header.getName(), header.getValues());
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java
index e7b8b76e59ca6..b61fc5232bea1 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpPipelineBuilder.java
@@ -22,11 +22,22 @@
*
* Create a pipeline without configuration
*
- * {@codesnippet com.azure.core.http.HttpPipelineBuilder.noConfiguration}
+ *
+ *
+ * HttpPipeline pipeline = new HttpPipelineBuilder().build();
+ *
+ *
*
* Create a pipeline using the default HTTP client and a retry policy
*
- * {@codesnippet com.azure.core.http.HttpPipelineBuilder.defaultHttpClientWithRetryPolicy}
+ *
+ *
+ * HttpPipeline pipeline = new HttpPipelineBuilder()
+ * .httpClient(HttpClient.createDefault())
+ * .policies(new RetryPolicy())
+ * .build();
+ *
+ *
*
* @see HttpPipeline
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpResponse.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpResponse.java
index 7315237044b6b..5eb6427f515bf 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpResponse.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/HttpResponse.java
@@ -19,6 +19,11 @@
public abstract class HttpResponse implements Closeable {
private final HttpRequest request;
+ /**
+ * Creates an instance of {@link HttpResponse}.
+ *
+ * @param request The {@link HttpRequest} that resulted in this {@link HttpResponse}.
+ */
protected HttpResponse(HttpRequest request) {
this.request = request;
}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java
index 977820affb25b..7067cee921a6d 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RequestIdPolicy.java
@@ -19,7 +19,11 @@
*
* The default {@link HttpHeader} name can be overwritten as shown below
*
Code sample
- * {@codesnippet com.azure.core.http.policy.RequestIdPolicy.constructor.overrideRequestIdHeaderName}
+ *
+ *
+ * new RequestIdPolicy("x-ms-my-custom-request-id");
+ *
+ *
*/
public class RequestIdPolicy implements HttpPipelinePolicy {
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java
index 627793fae8bc6..c7a4b0b6a00b5 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/policy/RetryStrategy.java
@@ -13,6 +13,9 @@
*/
public interface RetryStrategy {
+ /**
+ * HTTP response status code for {@code Too Many Requests}.
+ */
int HTTP_STATUS_TOO_MANY_REQUESTS = 429;
/**
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFlux.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFlux.java
index 4c5b037da812c..e436b2b38f5dc 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFlux.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFlux.java
@@ -20,16 +20,51 @@
*
* To process one item at a time, simply subscribe to this flux as shown below
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedflux.items}
+ *
+ *
+ * // Subscribe to process one item at a time
+ * pagedFlux
+ * .log()
+ * .subscribe(item -> System.out.println("Processing item with value: " + item),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* To process one page at a time, use {@link #byPage()} method as shown below
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedflux.pages}
+ *
+ *
+ * // Subscribe to process one page at a time from the beginning
+ * pagedFlux
+ * .byPage()
+ * .log()
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* To process items one page at a time starting from any page associated with a continuation token,
* use {@link #byPage(String)} as shown below
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedflux.pagesWithContinuationToken}
+ *
+ *
+ * // Subscribe to process one page at a time starting from a page associated with
+ * // a continuation token
+ * String continuationToken = getContinuationToken();
+ * pagedFlux
+ * .byPage(continuationToken)
+ * .log()
+ * .doOnSubscribe(ignored -> System.out.println(
+ * "Subscribed to paged flux processing pages starting from: " + continuationToken))
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* @param The type of items in a {@link PagedResponse}
* @see PagedResponse
@@ -43,7 +78,15 @@ public class PagedFlux extends PagedFluxBase> {
* Supplier} that return the single page of {@code T}.
*
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedflux.singlepage.instantiation}
+ *
+ *
+ * // A supplier that fetches the first page of data from source/service
+ * Supplier<Mono<PagedResponse<Integer>>> firstPageRetrieverFunction = () -> getFirstPage();
+ *
+ * PagedFlux<Integer> pagedFluxInstance = new PagedFlux<>(firstPageRetrieverFunction,
+ * nextPageRetriever);
+ *
+ *
*
* @param firstPageRetriever Supplier that retrieves the first page.
*/
@@ -56,7 +99,15 @@ public PagedFlux(Supplier>> firstPageRetriever) {
*
* Code sample
*
- * {@codesnippet com.azure.core.http.rest.PagedFlux.singlepage.instantiationWithPageSize}
+ *
+ *
+ * // A function that fetches the single page of data from a source/service.
+ * Function<Integer, Mono<PagedResponse<Integer>>> singlePageRetriever = pageSize ->
+ * getFirstPageWithSize(pageSize);
+ *
+ * PagedFlux<Integer> singlePageFluxWithPageSize = new PagedFlux<Integer>(singlePageRetriever);
+ *
+ *
*
* @param firstPageRetriever Function that retrieves the first page.
*/
@@ -71,7 +122,19 @@ public PagedFlux(Function>> firstPageRetriever) {
*
* Code sample
*
- * {@codesnippet com.azure.core.http.rest.pagedflux.instantiation}
+ *
+ *
+ * // A supplier that fetches the first page of data from source/service
+ * Supplier<Mono<PagedResponse<Integer>>> firstPageRetriever = () -> getFirstPage();
+ *
+ * // A function that fetches subsequent pages of data from source/service given a continuation token
+ * Function<String, Mono<PagedResponse<Integer>>> nextPageRetriever =
+ * continuationToken -> getNextPage(continuationToken);
+ *
+ * PagedFlux<Integer> pagedFlux = new PagedFlux<>(firstPageRetriever,
+ * nextPageRetriever);
+ *
+ *
*
* @param firstPageRetriever Supplier that retrieves the first page
* @param nextPageRetriever Function that retrieves the next page given a continuation token
@@ -88,7 +151,18 @@ public PagedFlux(Supplier>> firstPageRetriever,
*
* Code sample
*
- * {@codesnippet com.azure.core.http.rest.PagedFlux.instantiationWithPageSize}
+ *
+ *
+ * // A function that fetches the first page of data from a source/service.
+ * Function<Integer, Mono<PagedResponse<Integer>>> firstPageRetriever = pageSize -> getFirstPageWithSize(pageSize);
+ *
+ * // A function that fetches subsequent pages of data from a source/service given a continuation token.
+ * BiFunction<String, Integer, Mono<PagedResponse<Integer>>> nextPageRetriever = (continuationToken, pageSize) ->
+ * getNextPageWithSize(continuationToken, pageSize);
+ *
+ * PagedFlux<Integer> pagedFluxWithPageSize = new PagedFlux<>(firstPageRetriever, nextPageRetriever);
+ *
+ *
*
* @param firstPageRetriever Function that retrieves the first page.
* @param nextPageRetriever BiFunction that retrieves the next page given a continuation token and page size.
@@ -124,7 +198,44 @@ private PagedFlux(Supplier>> provider, bo
*
*
* Decoration sample
- * {@codesnippet com.azure.core.http.rest.pagedflux.create.decoration}
+ *
+ *
+ *
+ * // Transform a PagedFlux with Integer items to PagedFlux of String items.
+ * final PagedFlux<Integer> intPagedFlux = createAnInstance();
+ *
+ * // PagedResponse<Integer> to PagedResponse<String> mapper
+ * final Function<PagedResponse<Integer>, PagedResponse<String>> responseMapper
+ * = intResponse -> new PagedResponseBase<Void, String>(intResponse.getRequest(),
+ * intResponse.getStatusCode(),
+ * intResponse.getHeaders(),
+ * intResponse.getValue()
+ * .stream()
+ * .map(intValue -> Integer.toString(intValue)).collect(Collectors.toList()),
+ * intResponse.getContinuationToken(),
+ * null);
+ *
+ * final Supplier<PageRetriever<String, PagedResponse<String>>> provider = () ->
+ * (continuationToken, pageSize) -> {
+ * Flux<PagedResponse<Integer>> flux = (continuationToken == null)
+ * ? intPagedFlux.byPage()
+ * : intPagedFlux.byPage(continuationToken);
+ * return flux.map(responseMapper);
+ * };
+ * PagedFlux<String> strPagedFlux = PagedFlux.create(provider);
+ *
+ * // Create a PagedFlux from a PagedFlux with all exceptions mapped to a specific exception.
+ * final PagedFlux<Integer> pagedFlux = createAnInstance();
+ * final Supplier<PageRetriever<String, PagedResponse<Integer>>> eprovider = () ->
+ * (continuationToken, pageSize) -> {
+ * Flux<PagedResponse<Integer>> flux = (continuationToken == null)
+ * ? pagedFlux.byPage()
+ * : pagedFlux.byPage(continuationToken);
+ * return flux.onErrorMap(PaginationException::new);
+ * };
+ * final PagedFlux<Integer> exceptionMappedPagedFlux = PagedFlux.create(eprovider);
+ *
+ *
*
* @param provider the Page Retrieval Provider
* @param The type of items in a {@link PagedResponse}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFluxBase.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFluxBase.java
index 4bc3ea9bb730e..4648a1f6b6b56 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFluxBase.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedFluxBase.java
@@ -20,15 +20,47 @@
*
* Process each item in Flux
* To process one item at a time, simply subscribe to this Flux.
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.items}
+ *
+ *
+ * pagedFluxBase
+ * .log()
+ * .subscribe(item -> System.out.println("Processing item with value: " + item),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* Process one page at a time
* To process one page at a time, starting from the beginning, use {@link #byPage() byPage()} method.
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.pages}
+ *
+ *
+ * pagedFluxBase
+ * .byPage()
+ * .log()
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* Process items starting from a continuation token
* To process items one page at a time starting from any page associated with a continuation token, use
- * {@link #byPage(String)}.
{@codesnippet com.azure.core.http.rest.pagedfluxbase.pagesWithContinuationToken}
+ * {@link #byPage(String)}.
+ *
+ *
+ * String continuationToken = getContinuationToken();
+ * pagedFluxBase
+ * .byPage(continuationToken)
+ * .log()
+ * .doOnSubscribe(ignored -> System.out.println(
+ * "Subscribed to paged flux processing pages starting from: " + continuationToken))
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* @param The type of items in {@code P}.
* @param The {@link PagedResponse} holding items of type {@code T}.
@@ -44,7 +76,16 @@ public class PagedFluxBase> extends ContinuablePag
* Supplier} that return the single page of {@code T}.
*
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.singlepage.instantiation}
+ *
+ *
+ * // A supplier that fetches the first page of data from source/service
+ * Supplier<Mono<PagedResponse<Integer>>> firstPageRetrieverFunction = () -> getFirstPage();
+ *
+ * PagedFluxBase<Integer, PagedResponse<Integer>> pagedFluxBaseInstance =
+ * new PagedFluxBase<>(firstPageRetrieverFunction,
+ * nextPageRetriever);
+ *
+ *
*
* @param firstPageRetriever Supplier that retrieves the first page.
*/
@@ -58,7 +99,19 @@ public PagedFluxBase(Supplier> firstPageRetriever) {
* T}.
*
* Code sample
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.instantiation}
+ *
+ *
+ * // A supplier that fetches the first page of data from source/service
+ * Supplier<Mono<PagedResponse<Integer>>> firstPageRetriever = () -> getFirstPage();
+ *
+ * // A function that fetches subsequent pages of data from source/service given a continuation token
+ * Function<String, Mono<PagedResponse<Integer>>> nextPageRetriever =
+ * continuationToken -> getNextPage(continuationToken);
+ *
+ * PagedFluxBase<Integer, PagedResponse<Integer>> pagedFluxBase = new PagedFluxBase<>(firstPageRetriever,
+ * nextPageRetriever);
+ *
+ *
*
* @param firstPageRetriever Supplier that retrieves the first page
* @param nextPageRetriever Function that retrieves the next page given a continuation token
@@ -86,7 +139,19 @@ public PagedFluxBase(Supplier> firstPageRetriever, FunctionCode sample
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.bypage}
+ *
+ *
+ * // Start processing the results from first page
+ * pagedFluxBase.byPage()
+ * .log()
+ * .doOnSubscribe(ignoredVal -> System.out.println(
+ * "Subscribed to paged flux processing pages starting from first page"))
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* @return A {@link PagedFluxBase} starting from the first page
*/
@@ -99,7 +164,20 @@ public Flux byPage() {
* To start from first page, use {@link #byPage()} instead.
*
*
Code sample
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.bypage#String}
+ *
+ *
+ * // Start processing the results from a page associated with the continuation token
+ * String continuationToken = getContinuationToken();
+ * pagedFluxBase.byPage(continuationToken)
+ * .log()
+ * .doOnSubscribe(ignoredVal -> System.out.println(
+ * "Subscribed to paged flux processing page starting from " + continuationToken))
+ * .subscribe(page -> System.out.printf("Processing page containing item values: %s%n",
+ * page.getElements().stream().map(String::valueOf).collect(Collectors.joining(", "))),
+ * error -> System.err.println("An error occurred: " + error),
+ * () -> System.out.println("Processing complete."));
+ *
+ *
*
* @param continuationToken The continuation token used to fetch the next page
* @return A {@link PagedFluxBase} starting from the page associated with the continuation token
@@ -113,7 +191,27 @@ public Flux byPage(String continuationToken) {
* common scenarios. This will seamlessly fetch next page when required and provide with a {@link Flux} of items.
*
*
Code sample
- * {@codesnippet com.azure.core.http.rest.pagedfluxbase.subscribe}
+ *
+ *
+ * pagedFluxBase.subscribe(new BaseSubscriber<Integer>() {
+ * @Override
+ * protected void hookOnSubscribe(Subscription subscription) {
+ * System.out.println("Subscribed to paged flux processing items");
+ * super.hookOnSubscribe(subscription);
+ * }
+ *
+ * @Override
+ * protected void hookOnNext(Integer value) {
+ * System.out.println("Processing item with value: " + value);
+ * }
+ *
+ * @Override
+ * protected void hookOnComplete() {
+ * System.out.println("Processing complete.");
+ * }
+ * });
+ *
+ *
*
* @param coreSubscriber The subscriber for this {@link PagedFluxBase}
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java
index 336407633c41d..a33e6b2d678c4 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterable.java
@@ -14,15 +14,43 @@
*
* Code sample using {@link Stream} by page
*
- * {@codesnippet com.azure.core.http.rest.pagedIterable.streamByPage}
+ *
+ *
+ * // process the streamByPage
+ * pagedIterableResponse.streamByPage().forEach(resp -> {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d %n", value));
+ * });
+ *
+ *
+ *
*
* Code sample using {@link Iterable} by page
*
- * {@codesnippet com.azure.core.http.rest.pagedIterable.iterableByPage}
+ *
+ *
+ * // process the iterableByPage
+ * pagedIterableResponse.iterableByPage().forEach(resp -> {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d %n", value));
+ * });
+ *
+ *
*
* Code sample using {@link Iterable} by page and while loop
*
- * {@codesnippet com.azure.core.http.rest.pagedIterable.iterableByPage.while}
+ *
+ *
+ * // iterate over each page
+ * for (PagedResponse<Integer> resp : pagedIterableResponse.iterableByPage()) {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d %n", value));
+ * }
+ *
+ *
*
* @param The type of value contained in this {@link IterableStream}.
* @see PagedResponse
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java
index 387ab619d4d37..748679fdbac88 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/PagedIterableBase.java
@@ -14,15 +14,45 @@
*
* Code sample using {@link Stream} by page
*
- * {@codesnippet com.azure.core.http.rest.pagedIterableBase.streamByPage}
+ *
+ *
+ * // process the streamByPage
+ * CustomPagedFlux<String> customPagedFlux = createCustomInstance();
+ * PagedIterableBase<String, PagedResponse<String>> customPagedIterableResponse =
+ * new PagedIterableBase<>(customPagedFlux);
+ * customPagedIterableResponse.streamByPage().forEach(resp -> {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %s %n", value));
+ * });
+ *
+ *
*
* Code sample using {@link Iterable} by page
*
- * {@codesnippet com.azure.core.http.rest.pagedIterableBase.iterableByPage}
+ *
+ *
+ * // process the iterableByPage
+ * customPagedIterableResponse.iterableByPage().forEach(resp -> {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %s %n", value));
+ * });
+ *
+ *
*
* Code sample using {@link Iterable} by page and while loop
*
- * {@codesnippet com.azure.core.http.rest.pagedIterableBase.iterableByPage.while}
+ *
+ *
+ * // iterate over each page
+ * for (PagedResponse<String> resp : customPagedIterableResponse.iterableByPage()) {
+ * System.out.printf("Response headers are %s. Url %s and status code %d %n", resp.getHeaders(),
+ * resp.getRequest().getUrl(), resp.getStatusCode());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %s %n", value));
+ * }
+ *
+ *
*
* @param The type of value contained in this {@link IterableStream}.
* @param The response extending from {@link PagedResponse}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RequestOptions.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RequestOptions.java
index eabf4d7c9dcff..fd42e2a201c5e 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RequestOptions.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RequestOptions.java
@@ -11,7 +11,7 @@
import java.util.function.Consumer;
/**
- * This class contains the options to customize a HTTP request. {@link RequestOptions} can be
+ * This class contains the options to customize an HTTP request. {@link RequestOptions} can be
* used to configure the request headers, query params, the request body, or add a callback
* to modify all aspects of the HTTP request.
*
@@ -27,10 +27,16 @@
*
*
* Creating an instance of RequestOptions
- * {@codesnippet com.azure.core.http.rest.requestoptions.instantiation}
+ *
+ *
+ * RequestOptions options = new RequestOptions()
+ * .setBody(BinaryData.fromString("{\"name\":\"Fluffy\"}"))
+ * .addHeader("x-ms-pet-version", "2021-06-01");
+ *
+ *
*
* Configuring the request with JSON body and making a HTTP POST request
- * To add a new pet to the pet store , a HTTP POST call should
+ * To add a new pet to the pet store , an HTTP POST call should
* be made to the service with the details of the pet that is to be added. The details of the pet are included as the
* request body in JSON format.
*
@@ -59,11 +65,50 @@
* To create a concrete request, Json builder provided in javax package is used here for demonstration. However, any
* other Json building library can be used to achieve similar results.
*
- * {@codesnippet com.azure.core.http.rest.requestoptions.createjsonrequest}
+ *
+ *
+ * JsonArray photoUrls = Json.createArrayBuilder()
+ * .add("https://imgur.com/pet1")
+ * .add("https://imgur.com/pet2")
+ * .build();
+ *
+ * JsonArray tags = Json.createArrayBuilder()
+ * .add(Json.createObjectBuilder()
+ * .add("id", 0)
+ * .add("name", "Labrador")
+ * .build())
+ * .add(Json.createObjectBuilder()
+ * .add("id", 1)
+ * .add("name", "2021")
+ * .build())
+ * .build();
+ *
+ * JsonObject requestBody = Json.createObjectBuilder()
+ * .add("id", 0)
+ * .add("name", "foo")
+ * .add("status", "available")
+ * .add("category", Json.createObjectBuilder().add("id", 0).add("name", "dog"))
+ * .add("photoUrls", photoUrls)
+ * .add("tags", tags)
+ * .build();
+ *
+ * String requestBodyStr = requestBody.toString();
+ *
+ *
*
* Now, this string representation of the JSON request can be set as body of RequestOptions
*
- * {@codesnippet com.azure.core.http.rest.requestoptions.postrequest}
+ *
+ *
+ * RequestOptions options = new RequestOptions()
+ * .addRequestCallback(request -> request
+ * // may already be set if request is created from a client
+ * .setUrl("https://petstore.example.com/pet")
+ * .setHttpMethod(HttpMethod.POST)
+ * .setBody(requestBodyStr)
+ * .setHeader("Content-Type", "application/json"));
+ *
+ *
*/
final class RequestOptions {
private Consumer requestCallback = request -> { };
@@ -78,7 +123,7 @@ Consumer getRequestCallback() {
}
/**
- * Gets whether or not to throw an exception when an HTTP response with a status code indicating an error
+ * Gets whether an exception is thrown when an HTTP response with a status code indicating an error
* (400 or above) is received.
*
* @return true if to throw on status codes of 400 or above, false if not. Default is true.
@@ -125,7 +170,7 @@ public RequestOptions addQueryParam(String parameterName, String value) {
*
* @param parameterName the name of the query parameter
* @param value the value of the query parameter
- * @param encoded whether or not this query parameter is already encoded
+ * @param encoded whether this query parameter is already encoded
* @return the modified RequestOptions object
*/
public RequestOptions addQueryParam(String parameterName, String value, boolean encoded) {
@@ -163,8 +208,8 @@ public RequestOptions setBody(BinaryData requestBody) {
}
/**
- * Sets whether or not to throw an exception when an HTTP response with a status code indicating an error
- * (400 or above) is received. By default an exception will be thrown when an error response is received.
+ * Sets whether exception is thrown when an HTTP response with a status code indicating an error
+ * (400 or above) is received. By default, an exception will be thrown when an error response is received.
*
* @param throwOnError true if to throw on status codes of 400 or above, false if not. Default is true.
* @return the modified RequestOptions object
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java
index 9f84a39354407..3fe5d9cfba7c1 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/http/rest/RestProxy.java
@@ -201,10 +201,16 @@ static Flux validateLength(final HttpRequest request) {
* @return The updated context containing the span context.
*/
private Context startTracingSpan(Method method, Context context) {
- boolean disableTracing = (boolean) context.getData(Tracer.DISABLE_TRACING_KEY).orElse(false);
- if (!TracerProxy.isTracingEnabled() || disableTracing) {
+ // First check if tracing is enabled. This is an optimized operation, so it is done first.
+ if (!TracerProxy.isTracingEnabled()) {
return context;
}
+
+ // Then check if this method disabled tracing. This requires walking a linked list, so do it last.
+ if ((boolean) context.getData(Tracer.DISABLE_TRACING_KEY).orElse(false)) {
+ return context;
+ }
+
String spanName = interfaceParser.getServiceName() + "." + method.getName();
context = TracerProxy.setSpanName(spanName, context);
return TracerProxy.start(spanName, context);
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/Option.java b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/Option.java
index 5404ac44b6fd2..4376aeb87f869 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/implementation/Option.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/implementation/Option.java
@@ -11,7 +11,37 @@
* non-null-value, null-value, or no-value.
*
* Code sample
- * {@codesnippet com.azure.core.util.Option}
+ *
+ *
+ * // An Option with non-null-value.
+ * Option<String> skuOption = Option.of("basic");
+ * if (skuOption.isInitialized()) {
+ * // Option.isInitialized() returns true because option is initialized with a non-null value.
+ * System.out.println(skuOption.getValue()); // print: "basic"
+ * }
+ *
+ * // An Option with null-value.
+ * Option<String> descriptionOption = Option.of(null);
+ * if (descriptionOption.isInitialized()) {
+ * // Option.isInitialized() returns true because option is initialized with an explicit null-value.
+ * System.out.println(skuOption.getValue()); // print: null
+ * }
+ *
+ * // An Option with no-value.
+ * Option<String> uninitializedOption = Option.uninitialized();
+ * if (!uninitializedOption.isInitialized()) {
+ * // Option.isInitialized() returns false because option is uninitialized.
+ * System.out.println("not initialized");
+ * }
+ *
+ * // Attempting to access the value when an option has no-value will throw 'NoSuchElementException'
+ * try {
+ * uninitializedOption.getValue();
+ * } catch (NoSuchElementException exception) {
+ * System.out.println(exception.getMessage()); // print: 'No value initialized'
+ * }
+ *
+ *
*
* @param The value type.
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/models/CloudEvent.java b/sdk/core/azure-core/src/main/java/com/azure/core/models/CloudEvent.java
index 3ad256f9d7694..c0fbcd767172f 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/models/CloudEvent.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/models/CloudEvent.java
@@ -53,13 +53,60 @@
* serialize the CloudEvent into its Json String representation and send it.
*
* Create CloudEvent Samples
- * {@codesnippet com.azure.core.model.CloudEvent#constructor}
+ *
+ *
+ * // Use BinaryData.fromBytes() to create data in format CloudEventDataFormat.BYTES
+ * byte[] exampleBytes = "Hello World".getBytes(StandardCharsets.UTF_8);
+ * CloudEvent cloudEvent = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromBytes(exampleBytes), CloudEventDataFormat.BYTES, "application/octet-stream");
+ *
+ * // Use BinaryData.fromObject() to create CloudEvent data in format CloudEventDataFormat.JSON
+ * // From a model class
+ * User user = new User("Stephen", "James");
+ * CloudEvent cloudEventDataObject = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(user), CloudEventDataFormat.JSON, "application/json");
+ *
+ * // From a String
+ * CloudEvent cloudEventDataStr = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject("Hello World"), CloudEventDataFormat.JSON, "text/plain");
+ *
+ * // From an Integer
+ * CloudEvent cloudEventDataInt = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(1), CloudEventDataFormat.JSON, "int");
+ *
+ * // From a Boolean
+ * CloudEvent cloudEventDataBool = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(true), CloudEventDataFormat.JSON, "bool");
+ *
+ * // From null
+ * CloudEvent cloudEventDataNull = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(null), CloudEventDataFormat.JSON, "null");
+ *
+ * // Use BinaryData.fromString() if you have a Json String for the CloudEvent data.
+ * String jsonStringForData = "\"Hello World\""; // A json String.
+ * CloudEvent cloudEventDataJsonStr = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromString(jsonStringForData), CloudEventDataFormat.JSON, "text/plain");
+ *
+ *
*
* On the contrary, if you receive CloudEvents and have the Json string representation of one or more of CloudEvents,
* use {@link #fromString(String)} to deserialize them from the Json string.
*
* Deserialize CloudEvent Samples
- * {@codesnippet com.azure.core.model.CloudEvent.fromString}
+ *
+ *
+ * List<CloudEvent> cloudEventList = CloudEvent.fromString(cloudEventJsonString);
+ * CloudEvent cloudEvent = cloudEventList.get(0);
+ * BinaryData cloudEventData = cloudEvent.getData();
+ *
+ * byte[] bytesValue = cloudEventData.toBytes(); // If data payload is in bytes (data_base64 is not null).
+ * User objectValue = cloudEventData.toObject(User.class); // If data payload is a User object.
+ * int intValue = cloudEventData.toObject(Integer.class); // If data payload is an int.
+ * boolean boolValue = cloudEventData.toObject(Boolean.class); // If data payload is boolean.
+ * String stringValue = cloudEventData.toObject(String.class); // If data payload is String.
+ * String jsonStringValue = cloudEventData.toString(); // The data payload represented in Json String.
+ *
+ *
*/
@Fluent
public final class CloudEvent {
@@ -182,7 +229,41 @@ public final class CloudEvent {
* attribute data of the CloudEvent's Json representation.
*
* Create CloudEvent Samples
- * {@codesnippet com.azure.core.model.CloudEvent#constructor}
+ *
+ *
+ * // Use BinaryData.fromBytes() to create data in format CloudEventDataFormat.BYTES
+ * byte[] exampleBytes = "Hello World".getBytes(StandardCharsets.UTF_8);
+ * CloudEvent cloudEvent = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromBytes(exampleBytes), CloudEventDataFormat.BYTES, "application/octet-stream");
+ *
+ * // Use BinaryData.fromObject() to create CloudEvent data in format CloudEventDataFormat.JSON
+ * // From a model class
+ * User user = new User("Stephen", "James");
+ * CloudEvent cloudEventDataObject = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(user), CloudEventDataFormat.JSON, "application/json");
+ *
+ * // From a String
+ * CloudEvent cloudEventDataStr = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject("Hello World"), CloudEventDataFormat.JSON, "text/plain");
+ *
+ * // From an Integer
+ * CloudEvent cloudEventDataInt = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(1), CloudEventDataFormat.JSON, "int");
+ *
+ * // From a Boolean
+ * CloudEvent cloudEventDataBool = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(true), CloudEventDataFormat.JSON, "bool");
+ *
+ * // From null
+ * CloudEvent cloudEventDataNull = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromObject(null), CloudEventDataFormat.JSON, "null");
+ *
+ * // Use BinaryData.fromString() if you have a Json String for the CloudEvent data.
+ * String jsonStringForData = "\"Hello World\""; // A json String.
+ * CloudEvent cloudEventDataJsonStr = new CloudEvent("/cloudevents/example/source", "Example.EventType",
+ * BinaryData.fromString(jsonStringForData), CloudEventDataFormat.JSON, "text/plain");
+ *
+ *
*
* @param source Identifies the context in which an event happened. The combination of id and source must be unique
* for each distinct event.
@@ -231,7 +312,20 @@ private CloudEvent() {
* null {@code id}, {@code source}, or {@code type}. If you want to skip this validation, use {@link #fromString(String, boolean)}.
*
* Deserialize CloudEvent Samples
- * {@codesnippet com.azure.core.model.CloudEvent.fromString}
+ *
+ *
+ * List<CloudEvent> cloudEventList = CloudEvent.fromString(cloudEventJsonString);
+ * CloudEvent cloudEvent = cloudEventList.get(0);
+ * BinaryData cloudEventData = cloudEvent.getData();
+ *
+ * byte[] bytesValue = cloudEventData.toBytes(); // If data payload is in bytes (data_base64 is not null).
+ * User objectValue = cloudEventData.toObject(User.class); // If data payload is a User object.
+ * int intValue = cloudEventData.toObject(Integer.class); // If data payload is an int.
+ * boolean boolValue = cloudEventData.toObject(Boolean.class); // If data payload is boolean.
+ * String stringValue = cloudEventData.toObject(String.class); // If data payload is String.
+ * String jsonStringValue = cloudEventData.toString(); // The data payload represented in Json String.
+ *
+ *
*
* @param cloudEventsJson the JSON payload containing one or more events.
*
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/models/JsonPatchDocument.java b/sdk/core/azure-core/src/main/java/com/azure/core/models/JsonPatchDocument.java
index 8f5fdfcfc6a91..2c0d8a6dad69c 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/models/JsonPatchDocument.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/models/JsonPatchDocument.java
@@ -74,7 +74,33 @@ List getOperations() {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendAdd#String-Object}
+ *
+ *
+ * /*
+ * * Add an object member to the JSON document { "foo" : "bar" } to get the JSON document
+ * * { "bar": "foo", "foo": "bar" }.
+ * */
+ * jsonPatchDocument.appendAdd("/bar", "foo");
+ *
+ * /*
+ * * Add an array element to the JSON document { "foo": [ "fizz", "fizzbuzz" ] } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendAdd("/foo/1", "buzz");
+ *
+ * /*
+ * * Add a nested member to the JSON document { "foo": "bar" } to get the JSON document
+ * * { "foo": "bar", "child": { "grandchild": { } } }.
+ * */
+ * jsonPatchDocument.appendAdd("/child", Collections.singletonMap("grandchild", Collections.emptyMap()));
+ *
+ * /*
+ * * Add an array element to the JSON document { "foo": [ "fizz", "buzz" ] } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendAdd("/foo/-", "fizzbuzz");
+ *
+ *
*
* @param path The path to apply the addition.
* @param value The value that will be serialized and added to the path.
@@ -95,7 +121,33 @@ public JsonPatchDocument appendAdd(String path, Object value) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendAddRaw#String-String}
+ *
+ *
+ * /*
+ * * Add an object member to the JSON document { "foo" : "bar" } to get the JSON document
+ * * { "bar": "foo", "foo": "bar" }.
+ * */
+ * jsonPatchDocument.appendAddRaw("/bar", "\"foo\"");
+ *
+ * /*
+ * * Add an array element to the JSON document { "foo": [ "fizz", "fizzbuzz" ] } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendAddRaw("/foo/1", "\"buzz\"");
+ *
+ * /*
+ * * Add a nested member to the JSON document { "foo": "bar" } to get the JSON document
+ * * { "foo": "bar", "child": { "grandchild": { } } }.
+ * */
+ * jsonPatchDocument.appendAddRaw("/child", "\"child\": { \"grandchild\": { } }");
+ *
+ * /*
+ * * Add an array element to the JSON document { "foo": [ "fizz", "buzz" ] } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendAddRaw("/foo/-", "\"fizzbuzz\"");
+ *
+ *
*
* @param path The path to apply the addition.
* @param rawJson The raw JSON value that will be added to the path.
@@ -119,7 +171,27 @@ private JsonPatchDocument appendAddInternal(String path, Option rawJsonO
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendReplace#String-Object}
+ *
+ *
+ * /*
+ * * Replace an object member in the JSON document { "bar": "qux", "foo": "bar" } to get the JSON document
+ * * { "bar": "foo", "foo": "bar" }.
+ * */
+ * jsonPatchDocument.appendReplace("/bar", "foo");
+ *
+ * /*
+ * * Replace an object member in the JSON document { "foo": "fizz" } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendReplace("/foo", new String[] {"fizz", "buzz", "fizzbuzz"});
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an invalid replace operation as the
+ * * target path doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendReplace("/baz", "foo");
+ *
+ *
*
* @param path The path to replace.
* @param value The value will be serialized and used as the replacement.
@@ -137,7 +209,27 @@ public JsonPatchDocument appendReplace(String path, Object value) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendReplaceRaw#String-String}
+ *
+ *
+ * /*
+ * * Replace an object member in the JSON document { "bar": "qux", "foo": "bar" } to get the JSON document
+ * * { "bar": "foo", "foo": "bar" }.
+ * */
+ * jsonPatchDocument.appendReplaceRaw("/bar", "\"foo\"");
+ *
+ * /*
+ * * Replace an object member in the JSON document { "foo": "fizz" } to get the JSON document
+ * * { "foo": [ "fizz", "buzz", "fizzbuzz" ] }.
+ * */
+ * jsonPatchDocument.appendReplaceRaw("/foo", "[ \"fizz\", \"buzz\", \"fizzbuzz\" ]");
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an invalid replace operation as the
+ * * target path doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendReplaceRaw("/baz", "\"foo\"");
+ *
+ *
*
* @param path The path to replace.
* @param rawJson The raw JSON value that will be used as the replacement.
@@ -161,7 +253,27 @@ private JsonPatchDocument appendReplaceInternal(String path, Option rawJ
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendCopy#String-String}
+ *
+ *
+ * /*
+ * * Copy an object member in the JSON document { "foo": "bar" } to get the JSON document
+ * * { "foo": "bar", "copy": "bar" }.
+ * */
+ * jsonPatchDocument.appendCopy("/foo", "/copy");
+ *
+ * /*
+ * * Copy an object member in the JSON document { "foo": { "bar": "baz" } } to get the JSON document
+ * * { "foo": { "bar": "baz" }, "bar": "baz" }.
+ * */
+ * jsonPatchDocument.appendCopy("/foo/bar", "/bar");
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an invalid copy operation as the
+ * * target from doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendCopy("/baz", "/fizz");
+ *
+ *
*
* @param from The path to copy from.
* @param path The path to copy to.
@@ -184,7 +296,33 @@ public JsonPatchDocument appendCopy(String from, String path) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendMove#String-String}
+ *
+ *
+ * /*
+ * * Move an object member in the JSON document { "foo": "bar", "bar": "foo" } to get the JSON document
+ * * { "bar": "bar" }.
+ * */
+ * jsonPatchDocument.appendMove("/foo", "/bar");
+ *
+ * /*
+ * * Move an object member in the JSON document { "foo": { "bar": "baz" } } to get the JSON document
+ * * { "foo": "baz" }.
+ * */
+ * jsonPatchDocument.appendMove("/foo/bar", "/foo");
+ *
+ * /*
+ * * Given the JSON document { "foo": { "bar": "baz" } } the following is an example of an invalid move operation
+ * * as the target path is a child of the target from.
+ * */
+ * jsonPatchDocument.appendMove("/foo", "/foo/bar");
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an invalid move operation as the
+ * * target from doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendMove("/baz", "/fizz");
+ *
+ *
*
* @param from The path to move from.
* @param path The path to move to.
@@ -205,7 +343,27 @@ public JsonPatchDocument appendMove(String from, String path) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendRemove#String}
+ *
+ *
+ * /*
+ * * Remove an object member in the JSON document { "foo": "bar", "bar": "foo" } to get the JSON document
+ * * { "foo": "bar" }.
+ * */
+ * jsonPatchDocument.appendRemove("/bar");
+ *
+ * /*
+ * * Remove an object member in the JSON document { "foo": { "bar": "baz" } } to get the JSON document
+ * * { "foo": { } }.
+ * */
+ * jsonPatchDocument.appendRemove("/foo/bar");
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an invalid remove operation as the
+ * * target from doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendRemove("/baz");
+ *
+ *
*
* @param path The path to remove.
* @return The updated JsonPatchDocument object.
@@ -224,7 +382,25 @@ public JsonPatchDocument appendRemove(String path) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendTest#String-Object}
+ *
+ *
+ * /*
+ * * Test an object member in the JSON document { "foo": "bar" } to get a successful operation.
+ * */
+ * jsonPatchDocument.appendTest("/foo", "bar");
+ *
+ * /*
+ * * Test an object member in the JSON document { "foo": "bar" } to get a unsuccessful operation.
+ * */
+ * jsonPatchDocument.appendTest("/foo", 42);
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an unsuccessful test operation as
+ * * the target path doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendTest("/baz", "bar");
+ *
+ *
*
* @param path The path to test.
* @param value The value that will be serialized and used to test against.
@@ -242,7 +418,25 @@ public JsonPatchDocument appendTest(String path, Object value) {
*
* Code Samples
*
- * {@codesnippet com.azure.core.util.JsonPatchDocument.appendTestRaw#String-String}
+ *
+ *
+ * /*
+ * * Test an object member in the JSON document { "foo": "bar" } to get a successful operation.
+ * */
+ * jsonPatchDocument.appendTestRaw("/foo", "\"bar\"");
+ *
+ * /*
+ * * Test an object member in the JSON document { "foo": "bar" } to get a unsuccessful operation.
+ * */
+ * jsonPatchDocument.appendTestRaw("/foo", "42");
+ *
+ * /*
+ * * Given the JSON document { "foo": "bar" } the following is an example of an unsuccessful test operation as
+ * * the target path doesn't exist in the document.
+ * */
+ * jsonPatchDocument.appendTestRaw("/baz", "\"bar\"");
+ *
+ *
*
* @param path The path to test.
* @param rawJson The raw JSON value that will be used to test against.
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/AsyncCloseable.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/AsyncCloseable.java
index 2eede858adb31..8e1be03f8f7fb 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/AsyncCloseable.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/AsyncCloseable.java
@@ -13,7 +13,23 @@
* as closing {@literal I/O}. Instead of returning a sync {@code close()}, we use {@code closeAsync()} so users'
* programs don't block waiting for this operation to complete.
*
- * {@codesnippet com.azure.core.util.AsyncCloseable.closeAsync}
+ *
+ *
+ * NetworkResource resource = new NetworkResource();
+ * resource.longRunningDownload("https://longdownload.com")
+ * .subscribe(
+ * byteBuffer -> System.out.println("Buffer received: " + byteBuffer),
+ * error -> System.err.printf("Error occurred while downloading: %s%n", error),
+ * () -> System.out.println("Completed download operation."));
+ *
+ * System.out.println("Press enter to stop downloading.");
+ * System.in.read();
+ *
+ * // We block here because it is the end of the main Program function. A real-life program may chain this
+ * // with some other close operations like save download/program state, etc.
+ * resource.closeAsync().block();
+ *
+ *
*/
public interface AsyncCloseable {
/**
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/BinaryData.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/BinaryData.java
index 84ec965f2b268..7176d7b8138ff 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/BinaryData.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/BinaryData.java
@@ -73,27 +73,95 @@
*
* Create an instance from a byte array
*
- * {@codesnippet com.azure.core.util.BinaryData.fromBytes#byte}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * BinaryData binaryData = BinaryData.fromBytes(data);
+ * System.out.println(new String(binaryData.toBytes(), StandardCharsets.UTF_8));
+ *
+ *
*
* Create an instance from a String
*
- * {@codesnippet com.azure.core.util.BinaryData.fromString#String}
+ *
+ *
+ * final String data = "Some Data";
+ * // Following will use default character set as StandardCharsets.UTF_8
+ * BinaryData binaryData = BinaryData.fromString(data);
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* Create an instance from an InputStream
*
- * {@codesnippet com.azure.core.util.BinaryData.fromStream#InputStream}
+ *
+ *
+ * final ByteArrayInputStream inputStream = new ByteArrayInputStream("Some Data".getBytes(StandardCharsets.UTF_8));
+ * BinaryData binaryData = BinaryData.fromStream(inputStream);
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* Create an instance from an Object
*
- * {@codesnippet com.azure.core.util.BinaryData.fromObject#Object}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* Create an instance from {@code Flux}
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFlux#Flux}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * final Flux<ByteBuffer> dataFlux = Flux.just(ByteBuffer.wrap(data));
+ *
+ * Mono<BinaryData> binaryDataMono = BinaryData.fromFlux(dataFlux);
+ *
+ * Disposable subscriber = binaryDataMono
+ * .map(binaryData -> {
+ * System.out.println(binaryData.toString());
+ * return true;
+ * })
+ * .subscribe();
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* Create an instance from a file
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFile}
+ *
+ *
+ * BinaryData binaryData = BinaryData.fromFile(new File("path/to/file").toPath());
+ * System.out.println(new String(binaryData.toBytes(), StandardCharsets.UTF_8));
+ *
+ *
*
* @see ObjectSerializer
* @see JsonSerializer
@@ -119,7 +187,13 @@ public final class BinaryData {
*
* Create an instance from an InputStream
*
- * {@codesnippet com.azure.core.util.BinaryData.fromStream#InputStream}
+ *
+ *
+ * final ByteArrayInputStream inputStream = new ByteArrayInputStream("Some Data".getBytes(StandardCharsets.UTF_8));
+ * BinaryData binaryData = BinaryData.fromStream(inputStream);
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* @param inputStream The {@link InputStream} that {@link BinaryData} will represent.
* @return A {@link BinaryData} representing the {@link InputStream}.
@@ -136,7 +210,24 @@ public static BinaryData fromStream(InputStream inputStream) {
*
* Create an instance from an InputStream
*
- * {@codesnippet com.azure.core.util.BinaryData.fromStreamAsync#InputStream}
+ *
+ *
+ * final ByteArrayInputStream inputStream = new ByteArrayInputStream("Some Data".getBytes(StandardCharsets.UTF_8));
+ *
+ * Mono<BinaryData> binaryDataMono = BinaryData.fromStreamAsync(inputStream);
+ *
+ * Disposable subscriber = binaryDataMono
+ * .map(binaryData -> {
+ * System.out.println(binaryData.toString());
+ * return true;
+ * })
+ * .subscribe();
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param inputStream The {@link InputStream} that {@link BinaryData} will represent.
* @return A {@link Mono} of {@link BinaryData} representing the {@link InputStream}.
@@ -152,7 +243,25 @@ public static Mono fromStreamAsync(InputStream inputStream) {
*
* Create an instance from a Flux of ByteBuffer
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFlux#Flux}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * final Flux<ByteBuffer> dataFlux = Flux.just(ByteBuffer.wrap(data));
+ *
+ * Mono<BinaryData> binaryDataMono = BinaryData.fromFlux(dataFlux);
+ *
+ * Disposable subscriber = binaryDataMono
+ * .map(binaryData -> {
+ * System.out.println(binaryData.toString());
+ * return true;
+ * })
+ * .subscribe();
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param data The {@link Flux} of {@link ByteBuffer} that {@link BinaryData} will represent.
* @return A {@link Mono} of {@link BinaryData} representing the {@link Flux} of {@link ByteBuffer}.
@@ -171,7 +280,25 @@ public static Mono fromFlux(Flux data) {
*
* Create an instance from a Flux of ByteBuffer
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFlux#Flux}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * final Flux<ByteBuffer> dataFlux = Flux.just(ByteBuffer.wrap(data));
+ *
+ * Mono<BinaryData> binaryDataMono = BinaryData.fromFlux(dataFlux);
+ *
+ * Disposable subscriber = binaryDataMono
+ * .map(binaryData -> {
+ * System.out.println(binaryData.toString());
+ * return true;
+ * })
+ * .subscribe();
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param data The {@link Flux} of {@link ByteBuffer} that {@link BinaryData} will represent.
* @param length The length of {@code data} in bytes.
@@ -202,7 +329,14 @@ public static Mono fromFlux(Flux data, Long length) {
*
* Create an instance from a String
*
- * {@codesnippet com.azure.core.util.BinaryData.fromString#String}
+ *
+ *
+ * final String data = "Some Data";
+ * // Following will use default character set as StandardCharsets.UTF_8
+ * BinaryData binaryData = BinaryData.fromString(data);
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* @param data The {@link String} that {@link BinaryData} will represent.
* @return A {@link BinaryData} representing the {@link String}.
@@ -223,7 +357,13 @@ public static BinaryData fromString(String data) {
*
* Create an instance from a byte array
*
- * {@codesnippet com.azure.core.util.BinaryData.fromBytes#byte}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * BinaryData binaryData = BinaryData.fromBytes(data);
+ * System.out.println(new String(binaryData.toBytes(), StandardCharsets.UTF_8));
+ *
+ *
*
* @param data The byte array that {@link BinaryData} will represent.
* @return A {@link BinaryData} representing the byte array.
@@ -243,7 +383,33 @@ public static BinaryData fromBytes(byte[] data) {
*
* Creating an instance from an Object
*
- * {@codesnippet com.azure.core.util.BinaryData.fromObject#Object}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* @param data The object that will be JSON serialized that {@link BinaryData} will represent.
* @return A {@link BinaryData} representing the JSON serialized object.
@@ -264,7 +430,36 @@ public static BinaryData fromObject(Object data) {
*
* Creating an instance from an Object
*
- * {@codesnippet com.azure.core.util.BinaryData.fromObjectAsync#Object}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ * Disposable subscriber = BinaryData.fromObjectAsync(data)
+ * .subscribe(binaryData -> System.out.println(binaryData.toString()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param data The object that will be JSON serialized that {@link BinaryData} will represent.
* @return A {@link Mono} of {@link BinaryData} representing the JSON serialized object.
@@ -290,7 +485,35 @@ public static Mono fromObjectAsync(Object data) {
*
* Create an instance from an Object
*
- * {@codesnippet com.azure.core.util.BinaryData.fromObject#Object-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(data, serializer);
+ *
+ * System.out.println(binaryData.toString());
+ *
+ *
*
* @param data The object that will be serialized that {@link BinaryData} will represent. The {@code serializer}
* determines how {@code null} data is serialized.
@@ -322,7 +545,38 @@ public static BinaryData fromObject(Object data, ObjectSerializer serializer) {
*
* Create an instance from an Object
*
- * {@codesnippet com.azure.core.util.BinaryData.fromObjectAsync#Object-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * Disposable subscriber = BinaryData.fromObjectAsync(data, serializer)
+ * .subscribe(binaryData -> System.out.println(binaryData.toString()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param data The object that will be serialized that {@link BinaryData} will represent. The {@code serializer}
* determines how {@code null} data is serialized.
@@ -344,7 +598,12 @@ public static Mono fromObjectAsync(Object data, ObjectSerializer ser
*
* Create an instance from a file
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFile}
+ *
+ *
+ * BinaryData binaryData = BinaryData.fromFile(new File("path/to/file").toPath());
+ * System.out.println(new String(binaryData.toBytes(), StandardCharsets.UTF_8));
+ *
+ *
*
* @param file The {@link Path} that will be the {@link BinaryData} data.
* @return A new {@link BinaryData}.
@@ -361,7 +620,12 @@ public static BinaryData fromFile(Path file) {
*
* Create an instance from a file
*
- * {@codesnippet com.azure.core.util.BinaryData.fromFile#Path-int}
+ *
+ *
+ * BinaryData binaryData = BinaryData.fromFile(new File("path/to/file").toPath(), 8092);
+ * System.out.println(new String(binaryData.toBytes(), StandardCharsets.UTF_8));
+ *
+ *
*
* @param file The {@link Path} that will be the {@link BinaryData} data.
* @param chunkSize The requested size for each read of the path.
@@ -412,7 +676,37 @@ public String toString() {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#Class}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Ensure your classpath have the Serializer to serialize the object which implement implement
+ * // com.azure.core.util.serializer.JsonSerializer interface.
+ * // Or use Azure provided libraries for this.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * Person person = binaryData.toObject(Person.class);
+ * System.out.println(person.getName());
+ *
+ *
*
* @param Type of the deserialized Object.
* @param clazz The {@link Class} representing the Object's type.
@@ -439,11 +733,62 @@ public T toObject(Class clazz) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#TypeReference}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Ensure your classpath have the Serializer to serialize the object which implement implement
+ * // com.azure.core.util.serializer.JsonSerializer interface.
+ * // Or use Azure provided libraries for this.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * Person person = binaryData.toObject(TypeReference.createInstance(Person.class));
+ * System.out.println(person.getName());
+ *
+ *
*
* Get a generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#TypeReference-generic}
+ *
+ *
+ * final Person person1 = new Person().setName("John");
+ * final Person person2 = new Person().setName("Jack");
+ *
+ * List<Person> personList = new ArrayList<>();
+ * personList.add(person1);
+ * personList.add(person2);
+ *
+ * // Ensure your classpath have the Serializer to serialize the object which implement implement
+ * // com.azure.core.util.serializer.JsonSerializer interface.
+ * // Or use Azure provided libraries for this.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ *
+ * BinaryData binaryData = BinaryData.fromObject(personList);
+ *
+ * List<Person> persons = binaryData.toObject(new TypeReference<List<Person>>() { });
+ * persons.forEach(person -> System.out.println(person.getName()));
+ *
+ *
*
* @param typeReference The {@link TypeReference} representing the Object's type.
* @param Type of the deserialized Object.
@@ -475,7 +820,37 @@ public T toObject(TypeReference typeReference) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#Class-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(data, serializer);
+ *
+ * Person person = binaryData.toObject(Person.class, serializer);
+ * System.out.println("Name : " + person.getName());
+ *
+ *
*
* @param clazz The {@link Class} representing the Object's type.
* @param serializer The {@link ObjectSerializer} used to deserialize object.
@@ -511,11 +886,59 @@ public T toObject(Class clazz, ObjectSerializer serializer) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#TypeReference-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(data, serializer);
+ *
+ * Person person = binaryData.toObject(TypeReference.createInstance(Person.class), serializer);
+ * System.out.println("Name : " + person.getName());
+ *
+ *
+ *
*
* Get a generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObject#TypeReference-ObjectSerializer-generic}
+ *
+ *
+ * final Person person1 = new Person().setName("John");
+ * final Person person2 = new Person().setName("Jack");
+ *
+ * List<Person> personList = new ArrayList<>();
+ * personList.add(person1);
+ * personList.add(person2);
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(personList, serializer);
+ *
+ * // Retains the type of the list when deserializing
+ * List<Person> persons = binaryData.toObject(new TypeReference<List<Person>>() { }, serializer);
+ * persons.forEach(person -> System.out.println("Name : " + person.getName()));
+ *
+ *
*
* @param typeReference The {@link TypeReference} representing the Object's type.
* @param serializer The {@link ObjectSerializer} used to deserialize object.
@@ -547,7 +970,41 @@ public T toObject(TypeReference typeReference, ObjectSerializer serialize
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#Class}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Ensure your classpath have the Serializer to serialize the object which implement implement
+ * // com.azure.core.util.serializer.JsonSerializer interface.
+ * // Or use Azure provided libraries for this.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * Disposable subscriber = binaryData.toObjectAsync(Person.class)
+ * .subscribe(person -> System.out.println(person.getName()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param clazz The {@link Class} representing the Object's type.
* @param Type of the deserialized Object.
@@ -574,11 +1031,63 @@ public Mono toObjectAsync(Class clazz) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#TypeReference}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Ensure your classpath have the Serializer to serialize the object which implement implement
+ * // com.azure.core.util.serializer.JsonSerializer interface.
+ * // Or use Azure provided libraries for this.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * BinaryData binaryData = BinaryData.fromObject(data);
+ *
+ * Disposable subscriber = binaryData.toObjectAsync(TypeReference.createInstance(Person.class))
+ * .subscribe(person -> System.out.println(person.getName()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* Get a generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#TypeReference-generic}
+ *
+ *
+ * final Person person1 = new Person().setName("John");
+ * final Person person2 = new Person().setName("Jack");
+ *
+ * List<Person> personList = new ArrayList<>();
+ * personList.add(person1);
+ * personList.add(person2);
+ *
+ * BinaryData binaryData = BinaryData.fromObject(personList);
+ *
+ * Disposable subscriber = binaryData.toObjectAsync(new TypeReference<List<Person>>() { })
+ * .subscribe(persons -> persons.forEach(person -> System.out.println(person.getName())));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param typeReference The {@link TypeReference} representing the Object's type.
* @param Type of the deserialized Object.
@@ -610,7 +1119,41 @@ public Mono toObjectAsync(TypeReference typeReference) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#Class-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(data, serializer);
+ *
+ * Disposable subscriber = binaryData.toObjectAsync(Person.class, serializer)
+ * .subscribe(person -> System.out.println(person.getName()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param clazz The {@link Class} representing the Object's type.
* @param serializer The {@link ObjectSerializer} used to deserialize object.
@@ -646,11 +1189,67 @@ public Mono toObjectAsync(Class clazz, ObjectSerializer serializer) {
*
* Get a non-generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#TypeReference-ObjectSerializer}
+ *
+ *
+ * class Person {
+ * @JsonProperty
+ * private String name;
+ *
+ * @JsonSetter
+ * public Person setName(String name) {
+ * this.name = name;
+ * return this;
+ * }
+ *
+ * @JsonGetter
+ * public String getName() {
+ * return name;
+ * }
+ * }
+ * final Person data = new Person().setName("John");
+ *
+ * // Provide your custom serializer or use Azure provided serializers.
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-jackson or
+ * // https://mvnrepository.com/artifact/com.azure/azure-core-serializer-json-gson
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(data, serializer);
+ *
+ * Disposable subscriber = binaryData
+ * .toObjectAsync(TypeReference.createInstance(Person.class), serializer)
+ * .subscribe(person -> System.out.println(person.getName()));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* Get a generic Object from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toObjectAsync#TypeReference-ObjectSerializer-generic}
+ *
+ *
+ * final Person person1 = new Person().setName("John");
+ * final Person person2 = new Person().setName("Jack");
+ *
+ * List<Person> personList = new ArrayList<>();
+ * personList.add(person1);
+ * personList.add(person2);
+ *
+ * final ObjectSerializer serializer =
+ * new MyJsonSerializer(); // Replace this with your Serializer
+ * BinaryData binaryData = BinaryData.fromObject(personList, serializer);
+ *
+ * Disposable subscriber = binaryData
+ * .toObjectAsync(new TypeReference<List<Person>>() { }, serializer) // retains the generic type information
+ * .subscribe(persons -> persons.forEach(person -> System.out.println(person.getName())));
+ *
+ * // So that your program wait for above subscribe to complete.
+ * TimeUnit.SECONDS.sleep(5);
+ * subscriber.dispose();
+ *
+ *
*
* @param typeReference The {@link TypeReference} representing the Object's type.
* @param serializer The {@link ObjectSerializer} used to deserialize object.
@@ -670,7 +1269,15 @@ public Mono toObjectAsync(TypeReference typeReference, ObjectSerialize
*
* Get an InputStream from the BinaryData
*
- * {@codesnippet com.azure.core.util.BinaryData.toStream}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * BinaryData binaryData = BinaryData.fromStream(new ByteArrayInputStream(data));
+ * final byte[] bytes = new byte[data.length];
+ * binaryData.toStream().read(bytes, 0, data.length);
+ * System.out.println(new String(bytes));
+ *
+ *
*
* @return An {@link InputStream} representing the {@link BinaryData}.
*/
@@ -685,7 +1292,15 @@ public InputStream toStream() {
*
* Get a read-only ByteBuffer from the BinaryData
*
- * {@codesnippet com.azure.util.BinaryData.toByteBuffer}
+ *
+ *
+ * final byte[] data = "Some Data".getBytes(StandardCharsets.UTF_8);
+ * BinaryData binaryData = BinaryData.fromBytes(data);
+ * final byte[] bytes = new byte[data.length];
+ * binaryData.toByteBuffer().get(bytes, 0, data.length);
+ * System.out.println(new String(bytes));
+ *
+ *
*
* @return A read-only {@link ByteBuffer} representing the {@link BinaryData}.
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/ClientOptions.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/ClientOptions.java
index 9f3017eab347d..75902c07315a9 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/ClientOptions.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/ClientOptions.java
@@ -45,7 +45,12 @@ public String getApplicationId() {
*
* Create ClientOptions with application ID 'myApplicationId'
*
- * {@codesnippet com.azure.core.util.ClientOptions.setApplicationId#String}
+ *
+ *
+ * ClientOptions clientOptions = new ClientOptions()
+ * .setApplicationId("myApplicationId");
+ *
+ *
*
* @param applicationId The application ID.
*
@@ -79,7 +84,12 @@ public ClientOptions setApplicationId(String applicationId) {
*
* Create ClientOptions with Header 'myCustomHeader':'myStaticValue'
*
- * {@codesnippet com.azure.core.util.ClientOptions.setHeaders#Iterable}
+ *
+ *
+ * ClientOptions clientOptions = new ClientOptions()
+ * .setHeaders(Collections.singletonList(new Header("myCustomHeader", "myStaticValue")));
+ *
+ *
*
* @param headers The headers.
* @return The updated ClientOptions object.
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/Configuration.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/Configuration.java
index 80b63e27933a8..9edb2fbc4bd7d 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/Configuration.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/Configuration.java
@@ -93,7 +93,7 @@ public class Configuration implements Cloneable {
*/
public static final String PROPERTY_AZURE_POD_IDENTITY_TOKEN_URL = "AZURE_POD_IDENTITY_TOKEN_URL";
- /*
+ /**
* Name of Azure AAD regional authority.
*/
public static final String PROPERTY_AZURE_REGIONAL_AUTHORITY_NAME = "AZURE_REGIONAL_AUTHORITY_NAME";
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/Context.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/Context.java
index 33320b9e3e24c..f3295e571142d 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/Context.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/Context.java
@@ -54,7 +54,18 @@ public Map getValues() {
*
* Code samples
*
- * {@codesnippet com.azure.core.util.context#object-object}
+ *
+ *
+ * // Create an empty context having no data
+ * Context emptyContext = Context.NONE;
+ *
+ * // Tracing spans created by users can be passed to calling methods in sdk clients using Context object
+ * final String userParentSpan = "user-parent-span";
+ *
+ * // Create a context using the provided key and user parent span
+ * Context keyValueContext = new Context(PARENT_SPAN_KEY, userParentSpan);
+ *
+ *
*
* @param key The key with which the specified value should be associated.
* @param value The value to be associated with the specified key.
@@ -78,7 +89,24 @@ private Context(Context parent, Object key, Object value) {
*
* Code samples
*
- * {@codesnippet com.azure.core.util.context.addData#object-object}
+ *
+ *
+ * // Users can send parent span information and pass additional metadata to attach to spans of the calling methods
+ * // using the Context object
+ * final String hostNameValue = "host-name-value";
+ * final String entityPathValue = "entity-path-value";
+ * final String userParentSpan = "user-parent-span";
+ * Context parentSpanContext = new Context(PARENT_SPAN_KEY, userParentSpan);
+ *
+ * // Add a new key value pair to the existing context object.
+ * Context updatedContext = parentSpanContext.addData(HOST_NAME_KEY, hostNameValue)
+ * .addData(ENTITY_PATH_KEY, entityPathValue);
+ *
+ * // Both key values found on the same updated context object
+ * System.out.printf("Hostname value: %s%n", updatedContext.getData(HOST_NAME_KEY).get());
+ * System.out.printf("Entity Path value: %s%n", updatedContext.getData(ENTITY_PATH_KEY).get());
+ *
+ *
*
* @param key The key with which the specified value should be associated.
* @param value The value to be associated with the specified key.
@@ -98,7 +126,18 @@ public Context addData(Object key, Object value) {
*
* Code samples
*
- * {@codesnippet com.azure.core.util.context.of#map}
+ *
+ *
+ * final String key1 = "Key1";
+ * final String value1 = "first-value";
+ * Map<Object, Object> keyValueMap = new HashMap<>();
+ * keyValueMap.put(key1, value1);
+ *
+ * // Create a context using the provided key value pair map
+ * Context keyValueContext = Context.of(keyValueMap);
+ * System.out.printf("Key1 value %s%n", keyValueContext.getData(key1).get());
+ *
+ *
*
* @param keyValues The input key value pairs that will be added to this context.
* @return Context object containing all the key-value pairs in the input map.
@@ -126,7 +165,23 @@ public static Context of(Map keyValues) {
*
* Code samples
*
- * {@codesnippet com.azure.core.util.context.getData#object}
+ *
+ *
+ * final String key1 = "Key1";
+ * final String value1 = "first-value";
+ *
+ * // Create a context object with given key and value
+ * Context context = new Context(key1, value1);
+ *
+ * // Look for the specified key in the returned context object
+ * Optional<Object> optionalObject = context.getData(key1);
+ * if (optionalObject.isPresent()) {
+ * System.out.printf("Key1 value: %s%n", optionalObject.get());
+ * } else {
+ * System.out.println("Key1 does not exist or have data.");
+ * }
+ *
+ *
*
* @param key The key to search for.
* @return The value of the specified key if it exists.
@@ -149,7 +204,30 @@ public Optional getData(Object key) {
*
* Code samples
*
- * {@codesnippet com.azure.core.util.Context.getValues}
+ *
+ *
+ * final String key1 = "Key1";
+ * final String value1 = "first-value";
+ * final String key2 = "Key2";
+ * final String value2 = "second-value";
+ *
+ * Context context = new Context(key1, value1)
+ * .addData(key2, value2);
+ *
+ * Map<Object, Object> contextValues = context.getValues();
+ * if (contextValues.containsKey(key1)) {
+ * System.out.printf("Key1 value: %s%n", contextValues.get(key1));
+ * } else {
+ * System.out.println("Key1 does not exist.");
+ * }
+ *
+ * if (contextValues.containsKey(key2)) {
+ * System.out.printf("Key2 value: %s%n", contextValues.get(key2));
+ * } else {
+ * System.out.println("Key2 does not exist.");
+ * }
+ *
+ *
*
* @return A map containing all values of the context linked-list.
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java
index 9c9849203fe9b..7fa3cc84c78c0 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/CoreUtils.java
@@ -181,7 +181,9 @@ public static T findFirstOfType(Object[] args, Class clazz) {
* @param content The function which fetches items from the next page.
* @param The type of the item being returned by the paged response.
* @return The publisher holding all the generic items combined.
+ * @deprecated Use localized implementation.
*/
+ @Deprecated
public static Publisher extractAndFetch(PagedResponse page, Context context,
BiFunction> content) {
String nextPageLink = page.getContinuationToken();
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/FluxUtil.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/FluxUtil.java
index 86ab8f2e81647..5e6cf130132fe 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/FluxUtil.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/FluxUtil.java
@@ -244,7 +244,13 @@ public static Flux toFluxByteBuffer(InputStream inputStream, int chu
*
*
* Code samples
- * {@codesnippet com.azure.core.implementation.util.fluxutil.withcontext}
+ *
+ *
+ * String prefix = "Hello, ";
+ * Mono<String> response = FluxUtil
+ * .withContext(context -> serviceCallReturnsSingle(prefix, context));
+ *
+ *
*
* @param serviceCall The lambda function that makes the service call into which azure context will be passed
* @param The type of response returned from the service call
@@ -342,7 +348,13 @@ public static PagedFlux pagedFluxError(ClientLogger logger, RuntimeExcept
*
*
* Code samples
- * {@codesnippet com.azure.core.implementation.util.fluxutil.fluxcontext}
+ *
+ *
+ * String prefix = "Hello, ";
+ * Flux<String> response = FluxUtil
+ * .fluxContext(context -> serviceCallReturnsCollection(prefix, context));
+ *
+ *
*
* @param serviceCall The lambda function that makes the service call into which the context will be passed
* @param The type of response returned from the service call
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/IterableStream.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/IterableStream.java
index efb9def5fc67e..628f614a4ff4b 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/IterableStream.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/IterableStream.java
@@ -17,15 +17,48 @@
*
* Code sample using Stream
*
- * {@codesnippet com.azure.core.util.iterableStream.stream}
+ *
+ *
+ * // process the stream
+ * myIterableStream.stream().forEach(resp -> {
+ * if (resp.getStatusCode() == HttpURLConnection.HTTP_OK) {
+ * System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(),
+ * resp.getRequest().getUrl());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d%n", value));
+ * }
+ * });
+ *
+ *
*
* Code sample using Iterator
*
- * {@codesnippet com.azure.core.util.iterableStream.iterator.while}
+ *
+ *
+ * // Iterate over iterator
+ * for (PagedResponseBase<String, Integer> resp : myIterableStream) {
+ * if (resp.getStatusCode() == HttpURLConnection.HTTP_OK) {
+ * System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(),
+ * resp.getRequest().getUrl());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d%n", value));
+ * }
+ * }
+ *
+ *
*
* Code sample using Stream and filter
*
- * {@codesnippet com.azure.core.util.iterableStream.stream.filter}
+ *
+ *
+ * // process the stream
+ * myIterableStream.stream().filter(resp -> resp.getStatusCode() == HttpURLConnection.HTTP_OK)
+ * .limit(10)
+ * .forEach(resp -> {
+ * System.out.printf("Response headers are %s. Url %s%n", resp.getDeserializedHeaders(),
+ * resp.getRequest().getUrl());
+ * resp.getElements().forEach(value -> System.out.printf("Response value is %d%n", value));
+ * });
+ *
+ *
*
* @param The type of value in this {@link Iterable}.
* @see Iterable
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/UserAgentUtil.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/UserAgentUtil.java
index 97afa851214a6..6c1e06d898701 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/UserAgentUtil.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/UserAgentUtil.java
@@ -12,6 +12,10 @@ public final class UserAgentUtil {
private static final String INVALID_APPLICATION_ID_LENGTH = "'applicationId' length cannot be greater than "
+ MAX_APPLICATION_ID_LENGTH;
private static final String INVALID_APPLICATION_ID_SPACE = "'applicationId' cannot contain spaces.";
+
+ /**
+ * Default {@code UserAgent} header.
+ */
public static final String DEFAULT_USER_AGENT_HEADER = "azsdk-java";
// From the design guidelines, the platform info format is:
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java
index 4854b1eee61ab..c3ac6094e4ae0 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java
@@ -67,7 +67,12 @@ public ClientLogger(String className) {
*
* Logging with a specific log level
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.log}
+ *
+ *
+ * logger.log(LogLevel.VERBOSE,
+ * () -> String.format("Param 1: %s, Param 2: %s, Param 3: %s", "param1", "param2", "param3"));
+ *
+ *
*
* @param logLevel Logging level for the log message.
* @param message The format-able message to log.
@@ -83,7 +88,14 @@ public void log(LogLevel logLevel, Supplier message) {
*
* Logging with a specific log level and exception
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.log#throwable}
+ *
+ *
+ * Throwable illegalArgumentException = new IllegalArgumentException("An invalid argument was encountered.");
+ * logger.log(LogLevel.VERBOSE,
+ * () -> String.format("Param 1: %s, Param 2: %s, Param 3: %s", "param1", "param2", "param3"),
+ * illegalArgumentException);
+ *
+ *
*
* @param logLevel Logging level for the log message.
* @param message The format-able message to log.
@@ -102,7 +114,11 @@ public void log(LogLevel logLevel, Supplier message, Throwable throwable
*
* Logging a message at verbose log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.verbose}
+ *
+ *
+ * logger.verbose("A log message");
+ *
+ *
*
* @param message The message to log.
*/
@@ -119,7 +135,11 @@ public void verbose(String message) {
*
* Logging a message at verbose log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.verbose#string-object}
+ *
+ *
+ * logger.verbose("A formattable message. Hello, {}", name);
+ *
+ *
*
* @param format The formattable message to log.
* @param args Arguments for the message. If an exception is being logged, the last argument should be the {@link
@@ -138,7 +158,11 @@ public void verbose(String format, Object... args) {
*
* Logging a message at verbose log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.info}
+ *
+ *
+ * logger.info("A log message");
+ *
+ *
*
* @param message The message to log.
*/
@@ -155,7 +179,11 @@ public void info(String message) {
*
* Logging a message at informational log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.info#string-object}
+ *
+ *
+ * logger.info("A formattable message. Hello, {}", name);
+ *
+ *
*
* @param format The format-able message to log
* @param args Arguments for the message. If an exception is being logged, the last argument should be the {@link
@@ -174,7 +202,12 @@ public void info(String format, Object... args) {
*
* Logging a message at warning log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.warning}
+ *
+ *
+ * Throwable detailedException = new IllegalArgumentException("A exception with a detailed message");
+ * logger.warning(detailedException.getMessage());
+ *
+ *
*
* @param message The message to log.
*/
@@ -191,7 +224,12 @@ public void warning(String message) {
*
* Logging a message at warning log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.warning#string-object}
+ *
+ *
+ * Throwable exception = new IllegalArgumentException("An invalid argument was encountered.");
+ * logger.warning("A formattable message. Hello, {}", name, exception);
+ *
+ *
*
* @param format The format-able message to log.
* @param args Arguments for the message. If an exception is being logged, the last argument should be the {@link
@@ -210,7 +248,15 @@ public void warning(String format, Object... args) {
*
* Logging a message at error log level.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.error}
+ *
+ *
+ * try {
+ * upload(resource);
+ * } catch (IOException ex) {
+ * logger.error(ex.getMessage());
+ * }
+ *
+ *
*
* @param message The message to log.
*/
@@ -227,7 +273,15 @@ public void error(String message) {
*
* Logging an error with stack trace.
*
- * {@codesnippet com.azure.core.util.logging.clientlogger.error#string-object}
+ *
+ *
+ * try {
+ * upload(resource);
+ * } catch (IOException ex) {
+ * logger.error("A formattable message. Hello, {}", name, ex);
+ * }
+ *
+ *
*
* @param format The format-able message to log.
* @param args Arguments for the message. If an exception is being logged, the last argument should be the {@link
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/paging/ContinuablePagedFluxCore.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/paging/ContinuablePagedFluxCore.java
index 228ba61192d20..e18d0dcaf8ab2 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/paging/ContinuablePagedFluxCore.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/paging/ContinuablePagedFluxCore.java
@@ -29,7 +29,102 @@
* the Flux returned by the Page Retriever has {@code null} continuation token.
*
* Extending PagedFluxCore for Custom Continuation Token support
- * {@codesnippet com.azure.core.util.paging.pagedfluxcore.continuationtoken}
+ *
+ *
+ * class ContinuationState<C> {
+ * private C lastContinuationToken;
+ * private boolean isDone;
+ *
+ * ContinuationState(C token) {
+ * this.lastContinuationToken = token;
+ * }
+ *
+ * void setLastContinuationToken(C token) {
+ * this.isDone = token == null;
+ * this.lastContinuationToken = token;
+ * }
+ *
+ * C getLastContinuationToken() {
+ * return this.lastContinuationToken;
+ * }
+ *
+ * boolean isDone() {
+ * return this.isDone;
+ * }
+ * }
+ *
+ * class FileContinuationToken {
+ * private final int nextLinkId;
+ *
+ * FileContinuationToken(int nextLinkId) {
+ * this.nextLinkId = nextLinkId;
+ * }
+ *
+ * public int getNextLinkId() {
+ * return nextLinkId;
+ * }
+ * }
+ *
+ * class File {
+ * private final String guid;
+ *
+ * File(String guid) {
+ * this.guid = guid;
+ * }
+ *
+ * public String getGuid() {
+ * return guid;
+ * }
+ * }
+ *
+ * class FilePage implements ContinuablePage<FileContinuationToken, File> {
+ * private final IterableStream<File> elements;
+ * private final FileContinuationToken fileContinuationToken;
+ *
+ * FilePage(List<File> elements, FileContinuationToken fileContinuationToken) {
+ * this.elements = IterableStream.of(elements);
+ * this.fileContinuationToken = fileContinuationToken;
+ * }
+ *
+ * @Override
+ * public IterableStream<File> getElements() {
+ * return elements;
+ * }
+ *
+ * @Override
+ * public FileContinuationToken getContinuationToken() {
+ * return fileContinuationToken;
+ * }
+ * }
+ *
+ * class FileShareServiceClient {
+ * Flux<FilePage> getFilePages(FileContinuationToken token) {
+ * List<File> files = Collections.singletonList(new File(UUID.randomUUID().toString()));
+ * if (token.getNextLinkId() < 10) {
+ * return Flux.just(new FilePage(files, null));
+ * } else {
+ * return Flux.just(new FilePage(files,
+ * new FileContinuationToken((int) Math.floor(Math.random() * 20))));
+ * }
+ * }
+ * }
+ *
+ * FileShareServiceClient client = new FileShareServiceClient();
+ *
+ * Supplier<PageRetriever<FileContinuationToken, FilePage>> pageRetrieverProvider = () ->
+ * (continuationToken, pageSize) -> client.getFilePages(continuationToken);
+ *
+ * class FilePagedFlux extends ContinuablePagedFluxCore<FileContinuationToken, File, FilePage> {
+ * FilePagedFlux(Supplier<PageRetriever<FileContinuationToken, FilePage>>
+ * pageRetrieverProvider) {
+ * super(pageRetrieverProvider);
+ * }
+ * }
+ *
+ * FilePagedFlux filePagedFlux = new FilePagedFlux(pageRetrieverProvider);
+ *
+ *
+ *
*
* @param the type of the continuation token
* @param The type of elements in a {@link ContinuablePage}
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollResponse.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollResponse.java
index 654c6cfdaf2ef..31ebeaa5673b2 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollResponse.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollResponse.java
@@ -12,10 +12,26 @@
* {@link #getValue value} returned in the poll, as well as other useful information provided by the service.
*
* Code Sample Creating PollResponse Object
- * {@codesnippet com.azure.core.util.polling.pollresponse.status.value}
+ *
+ *
+ * // Lets say we want to crete poll response with status as IN_PROGRESS
+ *
+ * PollResponse<String> inProgressPollResponse
+ * = new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, "my custom response");
+ *
+ *
+ *
*
* Code Sample Creating PollResponse Object with custom status
- * {@codesnippet com.azure.core.util.polling.pollresponse.custom.status.value}
+ *
+ *
+ * // Lets say we want to crete poll response with custom status as OTHER_CUSTOM_STATUS
+ *
+ * PollResponse<String> pollResponseWithCustomStatus
+ * = new PollResponse<>(LongRunningOperationStatus.fromString("OTHER_CUSTOM_STATUS", false),
+ * "my custom status response");
+ *
+ *
*
* @param Type of poll response value.
* @see LongRunningOperationStatus
@@ -30,7 +46,15 @@ public final class PollResponse {
* Creates a new {@link PollResponse} with status, value, retryAfter and properties.
*
* Code Sample Creating PollResponse Object
- * {@codesnippet com.azure.core.util.polling.pollresponse.status.value.retryAfter.properties}
+ *
+ *
+ *
+ * // Lets say we want to crete poll response with status as IN_PROGRESS
+ * PollResponse<String> inProgressPollResponse
+ * = new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, "mycustom response",
+ * Duration.ofMillis(2000));
+ *
+ *
*
* @param status Mandatory operation status as defined in {@link LongRunningOperationStatus}.
* @param value The value as a result of poll operation. This can be any custom user-defined object. Null is also
@@ -52,7 +76,15 @@ public PollResponse(LongRunningOperationStatus status, T value,
* Creates a new {@link PollResponse} with status and value.
*
* Code Sample Creating PollResponse Object
- * {@codesnippet com.azure.core.util.polling.pollresponse.status.value}
+ *
+ *
+ * // Lets say we want to crete poll response with status as IN_PROGRESS
+ *
+ * PollResponse<String> inProgressPollResponse
+ * = new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, "my custom response");
+ *
+ *
+ *
*
* @param status Mandatory operation status as defined in {@link LongRunningOperationStatus}.
* @param value The value as a result of poll operation. This can be any custom user-defined object. Null is also
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollerFlux.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollerFlux.java
index f9837ae84142c..b0e93cf14dbe1 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollerFlux.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/polling/PollerFlux.java
@@ -23,19 +23,142 @@
* Code samples
*
* Instantiating and subscribing to PollerFlux
- * {@codesnippet com.azure.core.util.polling.poller.instantiationAndSubscribe}
+ *
+ *
+ * LocalDateTime timeToReturnFinalResponse = LocalDateTime.now().plus(Duration.ofMillis(800));
+ *
+ * // Create poller instance
+ * PollerFlux<String, String> poller = new PollerFlux<>(Duration.ofMillis(100),
+ * (context) -> Mono.empty(),
+ * // Define your custom poll operation
+ * (context) -> {
+ * if (LocalDateTime.now().isBefore(timeToReturnFinalResponse)) {
+ * System.out.println("Returning intermediate response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS,
+ * "Operation in progress."));
+ * } else {
+ * System.out.println("Returning final response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED,
+ * "Operation completed."));
+ * }
+ * },
+ * (activationResponse, context) -> Mono.error(new RuntimeException("Cancellation is not supported")),
+ * (context) -> Mono.just("Final Output"));
+ *
+ * // Listen to poll responses
+ * poller.subscribe(response -> {
+ * // Process poll response
+ * System.out.printf("Got response. Status: %s, Value: %s%n", response.getStatus(), response.getValue());
+ * });
+ * // Do something else
+ *
+ *
+ *
*
* Asynchronously wait for polling to complete and then retrieve the final result
- * {@codesnippet com.azure.core.util.polling.poller.getResult}
+ *
+ *
+ * LocalDateTime timeToReturnFinalResponse = LocalDateTime.now().plus(Duration.ofMinutes(5));
+ *
+ * // Create poller instance
+ * PollerFlux<String, String> poller = new PollerFlux<>(Duration.ofMillis(100),
+ * (context) -> Mono.empty(),
+ * (context) -> {
+ * if (LocalDateTime.now().isBefore(timeToReturnFinalResponse)) {
+ * System.out.println("Returning intermediate response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS,
+ * "Operation in progress."));
+ * } else {
+ * System.out.println("Returning final response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED,
+ * "Operation completed."));
+ * }
+ * },
+ * (activationResponse, context) -> Mono.just("FromServer:OperationIsCancelled"),
+ * (context) -> Mono.just("FromServer:FinalOutput"));
+ *
+ * poller.take(Duration.ofMinutes(30))
+ * .last()
+ * .flatMap(asyncPollResponse -> {
+ * if (asyncPollResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ * // operation completed successfully, retrieving final result.
+ * return asyncPollResponse
+ * .getFinalResult();
+ * } else {
+ * return Mono.error(new RuntimeException("polling completed unsuccessfully with status:"
+ * + asyncPollResponse.getStatus()));
+ * }
+ * }).block();
+ *
+ *
+ *
*
* Block for polling to complete and then retrieve the final result
- * {@codesnippet com.azure.core.util.polling.poller.blockAndGetResult}
+ *
+ *
+ * AsyncPollResponse<String, String> terminalResponse = pollerFlux.blockLast();
+ * System.out.printf("Polling complete. Final Status: %s", terminalResponse.getStatus());
+ * if (terminalResponse.getStatus() == LongRunningOperationStatus.SUCCESSFULLY_COMPLETED) {
+ * String finalResult = terminalResponse.getFinalResult().block();
+ * System.out.printf("Polling complete. Final Status: %s", finalResult);
+ * }
+ *
+ *
*
* Asynchronously poll until poller receives matching status
- * {@codesnippet com.azure.core.util.polling.poller.pollUntil}
+ *
+ *
+ * final Predicate<AsyncPollResponse<String, String>> isComplete = response -> {
+ * return response.getStatus() != LongRunningOperationStatus.IN_PROGRESS
+ * && response.getStatus() != LongRunningOperationStatus.NOT_STARTED;
+ * };
+ *
+ * pollerFlux
+ * .takeUntil(isComplete)
+ * .subscribe(completed -> {
+ * System.out.println("Completed poll response, status: " + completed.getStatus());
+ * });
+ *
+ *
*
* Asynchronously cancel the long running operation
- * {@codesnippet com.azure.core.util.polling.poller.cancelOperation}
+ *
+ *
+ * LocalDateTime timeToReturnFinalResponse = LocalDateTime.now().plus(Duration.ofMinutes(5));
+ *
+ * // Create poller instance
+ * PollerFlux<String, String> poller = new PollerFlux<>(Duration.ofMillis(100),
+ * (context) -> Mono.empty(),
+ * (context) -> {
+ * if (LocalDateTime.now().isBefore(timeToReturnFinalResponse)) {
+ * System.out.println("Returning intermediate response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS,
+ * "Operation in progress."));
+ * } else {
+ * System.out.println("Returning final response.");
+ * return Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED,
+ * "Operation completed."));
+ * }
+ * },
+ * (activationResponse, context) -> Mono.just("FromServer:OperationIsCancelled"),
+ * (context) -> Mono.just("FromServer:FinalOutput"));
+ *
+ * // Asynchronously wait 30 minutes to complete the polling, if not completed
+ * // within in the time then cancel the server operation.
+ * poller.take(Duration.ofMinutes(30))
+ * .last()
+ * .flatMap(asyncPollResponse -> {
+ * if (!asyncPollResponse.getStatus().isComplete()) {
+ * return asyncPollResponse
+ * .cancelOperation()
+ * .then(Mono.error(new RuntimeException("Operation is cancelled!")));
+ * } else {
+ * return Mono.just(asyncPollResponse);
+ * }
+ * }).block();
+ *
+ *
+ *
*
* @param The type of poll response value.
* @param The type of the final result of long running operation.
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/TypeReference.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/TypeReference.java
index d6839a1d67abd..cc1b3b64fbb5c 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/TypeReference.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/serializer/TypeReference.java
@@ -15,9 +15,22 @@
*
* Code sample
*
- * {@codesnippet com.azure.core.util.serializer.constructor}
+ *
+ *
+ * // Construct a TypeReference<T> for a Java generic type.
+ * // This pattern should only be used for generic types, for classes use the createInstance factory method.
+ * TypeReference<Map<String, Object>> typeReference = new TypeReference<Map<String, Object>>() { };
+ *
+ *
*
- * {@codesnippet com.azure.core.util.serializer.createInstance#class}
+ *
+ *
+ * // Construct a TypeReference<T> for a Java class.
+ * // This pattern should only be used for non-generic classes when possible, use the constructor for generic
+ * // class when possible.
+ * TypeReference<Integer> typeReference = TypeReference.createInstance(int.class);
+ *
+ *
*
* @param The type being represented.
*/
diff --git a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java
index 1d9593ead1a5e..f9e67cc1909a7 100644
--- a/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java
+++ b/sdk/core/azure-core/src/main/java/com/azure/core/util/tracing/Tracer.java
@@ -85,7 +85,16 @@ public interface Tracer {
* Code samples
*
* Starts a tracing span with provided method name and explicit parent span
- * {@codesnippet com.azure.core.util.tracing.start#string-context}
+ *
+ *
+ * // pass the current tracing span context to the calling method
+ * Context traceContext = new Context(PARENT_SPAN_KEY, "<user-current-span>");
+ * // start a new tracing span with the given method name and explicit parent span
+ * Context updatedContext = tracer.start("azure.keyvault.secrets/setsecret", traceContext);
+ * System.out.printf("Span returned in the context object: %s%n",
+ * updatedContext.getData(PARENT_SPAN_KEY).get());
+ *
+ *
*
* @param methodName Name of the method triggering the span creation.
* @param context Additional metadata that is passed through the call stack.
@@ -104,7 +113,16 @@ public interface Tracer {
* Code samples
*
* Starts a tracing span with provided method name and explicit parent span
- * {@codesnippet com.azure.core.util.tracing.start#options-context}
+ *
+ *
+ * // start a new CLIENT tracing span with the given start options and explicit parent span
+ * StartSpanOptions options = new StartSpanOptions(SpanKind.CLIENT)
+ * .setAttribute("key", "value");
+ * Context updatedClientSpanContext = tracer.start("azure.keyvault.secrets/setsecret", options, traceContext);
+ * System.out.printf("Span returned in the context object: %s%n",
+ * updatedClientSpanContext.getData(PARENT_SPAN_KEY).get());
+ *
+ *
*
* @param methodName Name of the method triggering the span creation.
* @param options span creation options.
@@ -140,13 +158,45 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Starts a tracing span with provided method name and AMQP operation SEND
- * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-SEND}
+ *
+ *
+ * // pass the current tracing span and request metadata to the calling method
+ * Context sendContext = new Context(PARENT_SPAN_KEY, "<user-current-span>")
+ * .addData(ENTITY_PATH_KEY, "entity-path").addData(HOST_NAME_KEY, "hostname");
+ *
+ * // start a new tracing span with explicit parent, sets the request attributes on the span and sets the span
+ * // kind to client when process kind SEND
+ * Context updatedSendContext = tracer.start("azure.eventhubs.send", sendContext, ProcessKind.SEND);
+ * System.out.printf("Span returned in the context object: %s%n",
+ * updatedSendContext.getData(PARENT_SPAN_KEY).get());
+ *
+ *
*
* Starts a tracing span with provided method name and AMQP operation MESSAGE
- * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-MESSAGE}
+ *
+ *
+ * String diagnosticIdKey = "Diagnostic-Id";
+ * // start a new tracing span with explicit parent, sets the diagnostic Id (traceparent headers) on the current
+ * // context when process kind MESSAGE
+ * Context updatedReceiveContext = tracer.start("azure.eventhubs.receive", traceContext,
+ * ProcessKind.MESSAGE);
+ * System.out.printf("Diagnostic Id: %s%n", updatedReceiveContext.getData(diagnosticIdKey).get().toString());
+ *
+ *
*
* Starts a tracing span with provided method name and AMQP operation PROCESS
- * {@codesnippet com.azure.core.util.tracing.start#string-context-processKind-PROCESS}
+ *
+ *
+ * String spanImplContext = "span-context";
+ * // start a new tracing span with remote parent and uses the span in the current context to return a scope
+ * // when process kind PROCESS
+ * Context processContext = new Context(PARENT_SPAN_KEY, "<user-current-span>")
+ * .addData(spanImplContext, "<user-current-span-context>");
+ * Context updatedProcessContext = tracer.start("azure.eventhubs.process", processContext,
+ * ProcessKind.PROCESS);
+ * System.out.printf("Scope: %s%n", updatedProcessContext.getData("scope").get());
+ *
+ *
*
* @param methodName Name of the method triggering the span creation.
* @param context Additional metadata that is passed through the call stack.
@@ -163,7 +213,16 @@ default Context start(String methodName, StartSpanOptions options, Context conte
*
* Completes the tracing span present in the context, with the corresponding OpenTelemetry status for the given
* response status code
- * {@codesnippet com.azure.core.util.tracing.end#int-throwable-context}
+ *
+ *
+ * // context containing the current tracing span to end
+ * String openTelemetrySpanKey = "openTelemetry-span";
+ * Context traceContext = new Context(PARENT_SPAN_KEY, "<user-current-span>");
+ *
+ * // completes the tracing span with the passed response status code
+ * tracer.end(200, null, traceContext);
+ *
+ *
*
* @param responseCode Response status code if the span is in an HTTP call context.
* @param error {@link Throwable} that happened during the span or {@code null} if no exception occurred.
@@ -178,7 +237,13 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Completes the tracing span with the corresponding OpenTelemetry status for the given status message
- * {@codesnippet com.azure.core.util.tracing.end#string-throwable-context}
+ *
+ *
+ * // context containing the current tracing span to end
+ * // completes the tracing span with the passed status message
+ * tracer.end("success", null, traceContext);
+ *
+ *
*
* @param statusMessage The error or success message that occurred during the call, or {@code null} if no error
* occurred.
@@ -204,7 +269,14 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Retrieve the span name of the returned span
- * {@codesnippet com.azure.core.util.tracing.setSpanName#string-context}
+ *
+ *
+ * // Sets the span name of the returned span on the context object, with key PARENT_SPAN_KEY
+ * String openTelemetrySpanKey = "openTelemetry-span";
+ * Context context = tracer.setSpanName("test-span-method", Context.NONE);
+ * System.out.printf("Span name: %s%n", context.getData(PARENT_SPAN_KEY).get().toString());
+ *
+ *
*
* @param spanName Name to give the next span.
* @param context Additional metadata that is passed through the call stack.
@@ -220,7 +292,18 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Link multiple spans using their span context information
- * {@codesnippet com.azure.core.util.tracing.addLink#context}
+ *
+ *
+ * // use the parent context containing the current tracing span to start a child span
+ * Context parentContext = new Context(PARENT_SPAN_KEY, "<user-current-span>");
+ * // use the returned span context information of the current tracing span to link
+ * Context spanContext = tracer.start("test.method", parentContext, ProcessKind.MESSAGE);
+ *
+ * // Adds a link between multiple span's using the span context information of the Span
+ * // For each event processed, add a link with the created spanContext
+ * tracer.addLink(spanContext);
+ *
+ *
*
* @param context Additional metadata that is passed through the call stack.
* @throws NullPointerException if {@code context} is {@code null}.
@@ -233,7 +316,14 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Extracts the corresponding span context information from a valid diagnostic id
- * {@codesnippet com.azure.core.util.tracing.extractContext#string-context}
+ *
+ *
+ * // Extracts the span context information from the passed diagnostic Id that can be used for linking spans.
+ * String spanImplContext = "span-context";
+ * Context spanContext = tracer.extractContext("valid-diagnostic-id", Context.NONE);
+ * System.out.printf("Span context of the current tracing span: %s%n", spanContext.getData(spanImplContext).get());
+ *
+ *
*
* @param diagnosticId Unique identifier for the trace information of the span.
* @param context Additional metadata that is passed through the call stack.
@@ -248,7 +338,14 @@ default Context start(String methodName, StartSpanOptions options, Context conte
* Code samples
*
* Returns a builder with the provided span name.
- * {@codesnippet com.azure.core.util.tracing.getSpanBuilder#string-context}
+ *
+ *
+ * // Returns a span builder with the provided name
+ * String methodName = "message-span";
+ * Context spanContext = tracer.getSharedSpanBuilder(methodName, Context.NONE);
+ * System.out.printf("Span context of the current tracing span: %s%n", spanContext.getData(SPAN_BUILDER_KEY).get());
+ *
+ *
*
* @param spanName Name to give the span for the created builder.
* @param context Additional metadata that is passed through the call stack.
@@ -304,7 +401,22 @@ default void addEvent(String name, Map attributes, OffsetDateTim
* Code samples
*
* Starts a tracing span, makes it current and ends it
- * {@codesnippet com.azure.core.util.tracing.makeSpanCurrent#context}
+ *
+ *
+ * // Starts a span, makes it current and then stops it.
+ * Context traceContext = tracer.start("EventHub.process", Context.NONE);
+ *
+ * // Make sure to always use try-with-resource statement with makeSpanCurrent
+ * try (AutoCloseable ignored = tracer.makeSpanCurrent(traceContext)) {
+ * System.out.println("doing some work...");
+ * } catch (Throwable throwable) {
+ * tracer.end("Failure", throwable, traceContext);
+ * } finally {
+ * tracer.end("OK", null, traceContext);
+ * }
+ *
+ *
+ *
*
* @return Closeable that should be closed in the same thread with try-with-resource statement.
*/
diff --git a/sdk/core/pom.xml b/sdk/core/pom.xml
index 098baf742b559..e01221d6fec0c 100644
--- a/sdk/core/pom.xml
+++ b/sdk/core/pom.xml
@@ -32,7 +32,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
@@ -47,7 +47,7 @@
com.azure
azure-core-experimental
- 1.0.0-beta.19
+ 1.0.0-beta.20
com.azure
@@ -72,7 +72,7 @@
com.azure
azure-core-serializer-avro-apache
- 1.0.0-beta.15
+ 1.0.0-beta.16
com.azure
@@ -87,7 +87,7 @@
com.azure
azure-core-tracing-opentelemetry
- 1.0.0-beta.15
+ 1.0.0-beta.16
diff --git a/sdk/core/tests.yml b/sdk/core/tests.yml
index 355098a1f90bc..ffd71c481481e 100644
--- a/sdk/core/tests.yml
+++ b/sdk/core/tests.yml
@@ -74,3 +74,7 @@ stages:
- name: azure-core-jackson-tests
groupId: com.azure
safeName: azurecorejacksontests
+ - template: /sdk/storage/tests-template.yml
+ parameters:
+ AdditionalMatrixReplace:
+ - TestFromSource=(.*)/true
diff --git a/sdk/cosmos/azure-cosmos-encryption/pom.xml b/sdk/cosmos/azure-cosmos-encryption/pom.xml
index a4176b42f5aba..34324dded09a3 100644
--- a/sdk/cosmos/azure-cosmos-encryption/pom.xml
+++ b/sdk/cosmos/azure-cosmos-encryption/pom.xml
@@ -152,7 +152,7 @@ Licensed under the MIT License.
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md
index 62b73b25c4f02..cbe874941a669 100644
--- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md
+++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/CHANGELOG.md
@@ -54,7 +54,7 @@
#### Key Bug Fixes
* Added validation for all config-settings with a name starting with "spark.cosmos."
-* Fixed a bug in bulk write causing hang.
+* Fixed a bug in bulk write causing nonresponse.
### 4.0.0-beta.2 (2021-04-19)
* Cosmos DB Spark 3.1.1 Connector Preview `4.0.0-beta.2` Release.
diff --git a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/pom.xml b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/pom.xml
index 2f8f23f85c592..62e229951eab7 100644
--- a/sdk/cosmos/azure-cosmos-spark_3-1_2-12/pom.xml
+++ b/sdk/cosmos/azure-cosmos-spark_3-1_2-12/pom.xml
@@ -90,7 +90,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -244,7 +244,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentProperty.java
@@ -615,7 +615,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
true
diff --git a/sdk/cosmos/azure-cosmos/pom.xml b/sdk/cosmos/azure-cosmos/pom.xml
index 875dd29e3d2a5..160294dc77730 100644
--- a/sdk/cosmos/azure-cosmos/pom.xml
+++ b/sdk/cosmos/azure-cosmos/pom.xml
@@ -81,7 +81,7 @@ Licensed under the MIT License.
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -93,7 +93,7 @@ Licensed under the MIT License.
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
@@ -105,29 +105,29 @@ Licensed under the MIT License.
com.fasterxml.jackson.module
jackson-module-afterburner
- 2.12.2
+ 2.12.5
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-core
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
- 2.12.4
+ 2.12.5
@@ -212,7 +212,7 @@ Licensed under the MIT License.
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -284,11 +284,11 @@ Licensed under the MIT License.
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
- com.fasterxml.jackson.core:jackson-core:[2.12.4]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.4]
- com.fasterxml.jackson.module:jackson-module-afterburner:[2.12.2]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
+ com.fasterxml.jackson.core:jackson-core:[2.12.5]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
+ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.5]
+ com.fasterxml.jackson.module:jackson-module-afterburner:[2.12.5]
io.dropwizard.metrics:metrics-core:[4.1.0]
io.micrometer:micrometer-core:[1.7.3]
org.slf4j:slf4j-api:[1.7.32]
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java
index 7cc05449ed836..fe6edb1a1aac9 100644
--- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/implementation/directconnectivity/rntbd/RntbdClientChannelHealthChecker.java
@@ -144,7 +144,7 @@ public Future isHealthy(final Channel channel) {
// Black hole detection, part 1:
// Treat the channel as unhealthy if the gap between the last attempted write and the last successful write
- // grew beyond acceptable limits, unless a write was attempted recently. This is a sign of a hung write.
+ // grew beyond acceptable limits, unless a write was attempted recently. This is a sign of a nonresponding write.
final long writeDelayInNanos =
timestamps.lastChannelWriteAttemptNanoTime() - timestamps.lastChannelWriteNanoTime();
@@ -157,7 +157,7 @@ public Future isHealthy(final Channel channel) {
final Optional rntbdContext = requestManager.rntbdContext();
final int pendingRequestCount = requestManager.pendingRequestCount();
- logger.warn("{} health check failed due to hung write: {lastChannelWriteAttemptNanoTime: {}, " +
+ logger.warn("{} health check failed due to nonresponding write: {lastChannelWriteAttemptNanoTime: {}, " +
"lastChannelWriteNanoTime: {}, writeDelayInNanos: {}, writeDelayLimitInNanos: {}, " +
"rntbdContext: {}, pendingRequestCount: {}}",
channel, timestamps.lastChannelWriteAttemptNanoTime(), timestamps.lastChannelWriteNanoTime(),
@@ -168,7 +168,7 @@ public Future isHealthy(final Channel channel) {
// Black hole detection, part 2:
// Treat the connection as unhealthy if the gap between the last successful write and the last successful read
- // grew beyond acceptable limits, unless a write succeeded recently. This is a sign of a hung read.
+ // grew beyond acceptable limits, unless a write succeeded recently. This is a sign of a nonresponding read.
final long readDelay = timestamps.lastChannelWriteNanoTime() - timestamps.lastChannelReadNanoTime();
final long readHangDuration = currentTime - timestamps.lastChannelWriteNanoTime();
@@ -178,7 +178,7 @@ public Future isHealthy(final Channel channel) {
final Optional rntbdContext = requestManager.rntbdContext();
final int pendingRequestCount = requestManager.pendingRequestCount();
- logger.warn("{} health check failed due to hung read: {lastChannelWrite: {}, lastChannelRead: {}, "
+ logger.warn("{} health check failed due to nonresponding read: {lastChannelWrite: {}, lastChannelRead: {}, "
+ "readDelay: {}, readDelayLimit: {}, rntbdContext: {}, pendingRequestCount: {}}", channel,
timestamps.lastChannelWriteNanoTime(), timestamps.lastChannelReadNanoTime(), readDelay,
this.readDelayLimitInNanos, rntbdContext, pendingRequestCount);
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/DedicatedGatewayRequestOptions.java b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/DedicatedGatewayRequestOptions.java
index 4757c3309ccfa..bdd82d3806964 100644
--- a/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/DedicatedGatewayRequestOptions.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/models/DedicatedGatewayRequestOptions.java
@@ -24,7 +24,7 @@ public DedicatedGatewayRequestOptions() {
/**
* Gets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link
- * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL}, responses from the
+ * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the
* integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness.
*
* Default value is null
@@ -40,7 +40,7 @@ public Duration getMaxIntegratedCacheStaleness() {
/**
* Sets the staleness value associated with the request in the Azure CosmosDB service. For requests where the {@link
- * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL}, responses from the
+ * com.azure.cosmos.ConsistencyLevel} is {@link com.azure.cosmos.ConsistencyLevel#EVENTUAL} or {@link com.azure.cosmos.ConsistencyLevel#SESSION}, responses from the
* integrated cache are guaranteed to be no staler than value indicated by this maxIntegratedCacheStaleness.
*
* Default value is null
diff --git a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java
index a077b29c482e1..884ec3d91e7a9 100644
--- a/sdk/cosmos/azure-cosmos/src/main/java/module-info.java
+++ b/sdk/cosmos/azure-cosmos/src/main/java/module-info.java
@@ -17,7 +17,6 @@
requires io.netty.codec.http2;
requires io.netty.transport.epoll;
requires io.netty.handler.proxy;
- requires reactor.netty;
requires reactor.netty.core;
requires reactor.netty.http;
requires com.codahale.metrics;
diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java
index ff82e533c30ac..a06887c999e06 100644
--- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java
+++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/CosmosTemplateIT.java
@@ -3,6 +3,7 @@
package com.azure.spring.data.cosmos.core;
import com.azure.cosmos.CosmosAsyncClient;
+import com.azure.cosmos.CosmosAsyncDatabase;
import com.azure.cosmos.CosmosClientBuilder;
import com.azure.cosmos.CosmosException;
import com.azure.cosmos.implementation.ConflictException;
@@ -117,18 +118,9 @@ public class CosmosTemplateIT {
public void setUp() throws ClassNotFoundException {
if (cosmosTemplate == null) {
client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder);
- final CosmosFactory cosmosFactory = new CosmosFactory(client, TestConstants.DB_NAME);
-
- final CosmosMappingContext mappingContext = new CosmosMappingContext();
personInfo = new CosmosEntityInformation<>(Person.class);
containerName = personInfo.getContainerName();
-
- mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class));
-
- final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext,
- null);
-
- cosmosTemplate = new CosmosTemplate(cosmosFactory, cosmosConfig, cosmosConverter);
+ cosmosTemplate = createCosmosTemplate(cosmosConfig, TestConstants.DB_NAME);
}
collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, Person.class,
@@ -137,6 +129,14 @@ public void setUp() throws ClassNotFoundException {
new PartitionKey(TEST_PERSON.getLastName()));
}
+ private CosmosTemplate createCosmosTemplate(CosmosConfig config, String dbName) throws ClassNotFoundException {
+ final CosmosFactory cosmosFactory = new CosmosFactory(client, dbName);
+ final CosmosMappingContext mappingContext = new CosmosMappingContext();
+ mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class));
+ final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null);
+ return new CosmosTemplate(cosmosFactory, config, cosmosConverter);
+ }
+
private void insertPerson(Person person) {
cosmosTemplate.insert(person,
new PartitionKey(personInfo.getPartitionKeyFieldValue(person)));
@@ -660,4 +660,34 @@ public void createWithAutoscale() throws ClassNotFoundException {
assertEquals(Integer.parseInt(TestConstants.AUTOSCALE_MAX_THROUGHPUT),
throughput.getProperties().getAutoscaleMaxThroughput());
}
+
+ @Test
+ public void createDatabaseWithThroughput() throws ClassNotFoundException {
+ final String configuredThroughputDbName = TestConstants.DB_NAME + "-configured-throughput";
+ deleteDatabaseIfExists(configuredThroughputDbName);
+
+ Integer expectedRequestUnits = 700;
+ final CosmosConfig config = CosmosConfig.builder()
+ .enableDatabaseThroughput(false, expectedRequestUnits)
+ .build();
+ final CosmosTemplate configuredThroughputCosmosTemplate = createCosmosTemplate(config, configuredThroughputDbName);
+
+ final CosmosEntityInformation personInfo =
+ new CosmosEntityInformation<>(Person.class);
+ configuredThroughputCosmosTemplate.createContainerIfNotExists(personInfo);
+
+ final CosmosAsyncDatabase database = client.getDatabase(configuredThroughputDbName);
+ final ThroughputResponse response = database.readThroughput().block();
+ assertEquals(expectedRequestUnits, response.getProperties().getManualThroughput());
+ }
+
+ private void deleteDatabaseIfExists(String dbName) {
+ CosmosAsyncDatabase database = client.getDatabase(dbName);
+ try {
+ database.delete().block();
+ } catch (CosmosException ex) {
+ assertEquals(ex.getStatusCode(), 404);
+ }
+ }
+
}
diff --git a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java
index ede2e69118dcf..ae4676eb498c1 100644
--- a/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java
+++ b/sdk/cosmos/azure-spring-data-cosmos-test/src/test/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplateIT.java
@@ -4,6 +4,7 @@
import com.azure.core.credential.AzureKeyCredential;
import com.azure.cosmos.CosmosAsyncClient;
+import com.azure.cosmos.CosmosAsyncDatabase;
import com.azure.cosmos.CosmosClientBuilder;
import com.azure.cosmos.CosmosException;
import com.azure.cosmos.implementation.ConflictException;
@@ -119,17 +120,9 @@ public void setUp() throws ClassNotFoundException {
azureKeyCredential = new AzureKeyCredential(cosmosDbKey);
cosmosClientBuilder.credential(azureKeyCredential);
client = CosmosFactory.createCosmosAsyncClient(cosmosClientBuilder);
- final CosmosFactory dbFactory = new CosmosFactory(client, TestConstants.DB_NAME);
-
- final CosmosMappingContext mappingContext = new CosmosMappingContext();
personInfo = new CosmosEntityInformation<>(Person.class);
containerName = personInfo.getContainerName();
-
- mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class));
-
- final MappingCosmosConverter dbConverter =
- new MappingCosmosConverter(mappingContext, null);
- cosmosTemplate = new ReactiveCosmosTemplate(dbFactory, cosmosConfig, dbConverter);
+ cosmosTemplate = createReactiveCosmosTemplate(cosmosConfig, TestConstants.DB_NAME);
}
collectionManager.ensureContainersCreatedAndEmpty(cosmosTemplate, Person.class, GenIdEntity.class, AuditableEntity.class);
@@ -138,6 +131,14 @@ public void setUp() throws ClassNotFoundException {
new PartitionKey(personInfo.getPartitionKeyFieldValue(TEST_PERSON))).block();
}
+ private ReactiveCosmosTemplate createReactiveCosmosTemplate(CosmosConfig config, String dbName) throws ClassNotFoundException {
+ final CosmosFactory cosmosFactory = new CosmosFactory(client, dbName);
+ final CosmosMappingContext mappingContext = new CosmosMappingContext();
+ mappingContext.setInitialEntitySet(new EntityScanner(this.applicationContext).scan(Persistent.class));
+ final MappingCosmosConverter cosmosConverter = new MappingCosmosConverter(mappingContext, null);
+ return new ReactiveCosmosTemplate(cosmosFactory, config, cosmosConverter);
+ }
+
@After
public void cleanup() {
// Reset master key
@@ -545,4 +546,34 @@ public void createWithAutoscale() {
assertEquals(Integer.parseInt(TestConstants.AUTOSCALE_MAX_THROUGHPUT),
throughput.getProperties().getAutoscaleMaxThroughput());
}
+
+ @Test
+ public void createDatabaseWithThroughput() throws ClassNotFoundException {
+ final String configuredThroughputDbName = TestConstants.DB_NAME + "-other";
+ deleteDatabaseIfExists(configuredThroughputDbName);
+
+ Integer expectedRequestUnits = 700;
+ final CosmosConfig config = CosmosConfig.builder()
+ .enableDatabaseThroughput(false, expectedRequestUnits)
+ .build();
+ final ReactiveCosmosTemplate configuredThroughputCosmosTemplate = createReactiveCosmosTemplate(config, configuredThroughputDbName);
+
+ final CosmosEntityInformation personInfo =
+ new CosmosEntityInformation<>(Person.class);
+ configuredThroughputCosmosTemplate.createContainerIfNotExists(personInfo).block();
+
+ final CosmosAsyncDatabase database = client.getDatabase(configuredThroughputDbName);
+ final ThroughputResponse response = database.readThroughput().block();
+ assertEquals(expectedRequestUnits, response.getProperties().getManualThroughput());
+ }
+
+ private void deleteDatabaseIfExists(String dbName) {
+ CosmosAsyncDatabase database = client.getDatabase(dbName);
+ try {
+ database.delete().block();
+ } catch (CosmosException ex) {
+ assertEquals(ex.getStatusCode(), 404);
+ }
+ }
+
}
diff --git a/sdk/cosmos/azure-spring-data-cosmos/README.md b/sdk/cosmos/azure-spring-data-cosmos/README.md
index 09c71fe5a6fe0..5ec4994de3ae0 100644
--- a/sdk/cosmos/azure-spring-data-cosmos/README.md
+++ b/sdk/cosmos/azure-spring-data-cosmos/README.md
@@ -180,6 +180,24 @@ public CosmosConfig cosmosConfig() {
By default, `@EnableCosmosRepositories` will scan the current package for any interfaces that extend one of Spring Data's repository interfaces.
Use it to annotate your Configuration class to scan a different root package by `@EnableCosmosRepositories(basePackageClass=UserRepository.class)` if your project layout has multiple projects.
+#### Using database provisioned throughput
+
+Cosmos supports both [container](https://docs.microsoft.com/azure/cosmos-db/sql/how-to-provision-container-throughput)
+and [database](https://docs.microsoft.com/azure/cosmos-db/sql/how-to-provision-database-throughput) provisioned
+throughput. By default, spring-data-cosmos will provision throughput for each container created. If you prefer
+to share throughput between containers, you can enable database provisioned throughput via CosmosConfig.
+
+```java
+@Override
+public CosmosConfig cosmosConfig() {
+ int autoscale = false;
+ int initialRequestUnits = 400;
+ return CosmosConfig.builder()
+ .enableDatabaseThroughput(autoscale, initialRequestUnits)
+ .build();
+}
+```
+
### Define an entity
- Define a simple entity as item in Azure Cosmos DB.
diff --git a/sdk/cosmos/azure-spring-data-cosmos/pom.xml b/sdk/cosmos/azure-spring-data-cosmos/pom.xml
index 3910445135fee..940351be5f122 100644
--- a/sdk/cosmos/azure-spring-data-cosmos/pom.xml
+++ b/sdk/cosmos/azure-spring-data-cosmos/pom.xml
@@ -93,17 +93,17 @@
com.fasterxml.jackson.module
jackson-module-parameter-names
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.datatype
jackson-datatype-jdk8
- 2.12.4
+ 2.12.5
com.fasterxml.jackson.datatype
jackson-datatype-jsr310
- 2.12.4
+ 2.12.5
org.javatuples
@@ -155,7 +155,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
@@ -202,9 +202,9 @@
org.springframework:spring-context:[5.3.9]
org.springframework.data:spring-data-commons:[2.5.4]
org.javatuples:javatuples:[1.2]
- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.12.4]
- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.4]
- com.fasterxml.jackson.module:jackson-module-parameter-names:[2.12.4]
+ com.fasterxml.jackson.datatype:jackson-datatype-jdk8:[2.12.5]
+ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:[2.12.5]
+ com.fasterxml.jackson.module:jackson-module-parameter-names:[2.12.5]
javax.annotation:javax.annotation-api:[1.3.2]
org.apache.commons:commons-lang3:[3.12.0]
org.slf4j:slf4j-api:[1.7.32]
@@ -217,7 +217,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
com/azure/spring/data/cosmos/core/mapping/BasicCosmosPersistentProperty.java
diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java
index 97d61aa158239..156d28623469f 100644
--- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java
+++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/CosmosConfig.java
@@ -13,6 +13,8 @@ public class CosmosConfig {
private final ResponseDiagnosticsProcessor responseDiagnosticsProcessor;
+ private final DatabaseThroughputConfig databaseThroughputConfig;
+
private final boolean queryMetricsEnabled;
/**
@@ -24,7 +26,22 @@ public class CosmosConfig {
@ConstructorProperties({"responseDiagnosticsProcessor", "queryMetricsEnabled"})
public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor,
boolean queryMetricsEnabled) {
+ this(responseDiagnosticsProcessor, null, queryMetricsEnabled);
+ }
+
+ /**
+ * Initialization
+ *
+ * @param responseDiagnosticsProcessor must not be {@literal null}
+ * @param databaseThroughputConfig may be @{literal null}
+ * @param queryMetricsEnabled must not be {@literal null}
+ */
+ @ConstructorProperties({"responseDiagnosticsProcessor", "databaseThroughputConfig", "queryMetricsEnabled"})
+ public CosmosConfig(ResponseDiagnosticsProcessor responseDiagnosticsProcessor,
+ DatabaseThroughputConfig databaseThroughputConfig,
+ boolean queryMetricsEnabled) {
this.responseDiagnosticsProcessor = responseDiagnosticsProcessor;
+ this.databaseThroughputConfig = databaseThroughputConfig;
this.queryMetricsEnabled = queryMetricsEnabled;
}
@@ -46,6 +63,15 @@ public boolean isQueryMetricsEnabled() {
return queryMetricsEnabled;
}
+ /**
+ * Gets the database throughput configuration.
+ *
+ * @return DatabaseThroughputConfig, or null if no database throughput is configured
+ */
+ public DatabaseThroughputConfig getDatabaseThroughputConfig() {
+ return databaseThroughputConfig;
+ }
+
/**
* Create a CosmosConfigBuilder instance
*
@@ -60,6 +86,7 @@ public static CosmosConfigBuilder builder() {
*/
public static class CosmosConfigBuilder {
private ResponseDiagnosticsProcessor responseDiagnosticsProcessor;
+ private DatabaseThroughputConfig databaseThroughputConfig;
private boolean queryMetricsEnabled;
CosmosConfigBuilder() {
}
@@ -88,19 +115,25 @@ public CosmosConfigBuilder enableQueryMetrics(boolean queryMetricsEnabled) {
return this;
}
+ public CosmosConfigBuilder enableDatabaseThroughput(boolean autoscale, int requestUnits) {
+ this.databaseThroughputConfig = new DatabaseThroughputConfig(autoscale, requestUnits);
+ return this;
+ }
+
/**
* Build a CosmosConfig instance
*
* @return CosmosConfig
*/
public CosmosConfig build() {
- return new CosmosConfig(this.responseDiagnosticsProcessor, this.queryMetricsEnabled);
+ return new CosmosConfig(this.responseDiagnosticsProcessor, this.databaseThroughputConfig, this.queryMetricsEnabled);
}
@Override
public String toString() {
return "CosmosConfigBuilder{"
+ "responseDiagnosticsProcessor=" + responseDiagnosticsProcessor
+ + ", databaseThroughputConfig=" + databaseThroughputConfig
+ ", queryMetricsEnabled=" + queryMetricsEnabled
+ '}';
}
diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/DatabaseThroughputConfig.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/DatabaseThroughputConfig.java
new file mode 100644
index 0000000000000..c593588cf8132
--- /dev/null
+++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/config/DatabaseThroughputConfig.java
@@ -0,0 +1,34 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+package com.azure.spring.data.cosmos.config;
+
+/**
+ * Throughput config for database creation
+ */
+public class DatabaseThroughputConfig {
+
+ private final boolean autoScale;
+ private final int requestUnits;
+
+ public DatabaseThroughputConfig(boolean autoScale, int requestUnits) {
+ this.autoScale = autoScale;
+ this.requestUnits = requestUnits;
+ }
+
+ public boolean isAutoScale() {
+ return autoScale;
+ }
+
+ public int getRequestUnits() {
+ return requestUnits;
+ }
+
+ @Override
+ public String toString() {
+ return "DatabaseThroughputConfig{"
+ + "autoScale=" + autoScale
+ + ", requestUnits=" + requestUnits
+ + '}';
+ }
+
+}
diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java
index 946b802f23133..655c7ed189375 100644
--- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java
+++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/CosmosTemplate.java
@@ -8,6 +8,7 @@
import com.azure.cosmos.CosmosAsyncDatabase;
import com.azure.cosmos.models.CosmosContainerProperties;
import com.azure.cosmos.models.CosmosContainerResponse;
+import com.azure.cosmos.models.CosmosDatabaseResponse;
import com.azure.cosmos.models.CosmosItemRequestOptions;
import com.azure.cosmos.models.CosmosItemResponse;
import com.azure.cosmos.models.CosmosQueryRequestOptions;
@@ -20,6 +21,7 @@
import com.azure.spring.data.cosmos.CosmosFactory;
import com.azure.spring.data.cosmos.common.CosmosUtils;
import com.azure.spring.data.cosmos.config.CosmosConfig;
+import com.azure.spring.data.cosmos.config.DatabaseThroughputConfig;
import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter;
import com.azure.spring.data.cosmos.core.generator.CountQueryGenerator;
import com.azure.spring.data.cosmos.core.generator.FindQuerySpecGenerator;
@@ -75,6 +77,7 @@ public class CosmosTemplate implements CosmosOperations, ApplicationContextAware
private final ResponseDiagnosticsProcessor responseDiagnosticsProcessor;
private final boolean queryMetricsEnabled;
private final CosmosAsyncClient cosmosAsyncClient;
+ private final DatabaseThroughputConfig databaseThroughputConfig;
private ApplicationContext applicationContext;
@@ -126,6 +129,7 @@ public CosmosTemplate(CosmosFactory cosmosFactory,
this.databaseName = cosmosFactory.getDatabaseName();
this.responseDiagnosticsProcessor = cosmosConfig.getResponseDiagnosticsProcessor();
this.queryMetricsEnabled = cosmosConfig.isQueryMetricsEnabled();
+ this.databaseThroughputConfig = cosmosConfig.getDatabaseThroughputConfig();
}
/**
@@ -458,8 +462,7 @@ public String getContainerName(Class> domainType) {
@Override
public CosmosContainerProperties createContainerIfNotExists(CosmosEntityInformation, ?> information) {
- final CosmosContainerResponse response = cosmosAsyncClient
- .createDatabaseIfNotExists(this.databaseName)
+ final CosmosContainerResponse response = createDatabaseIfNotExists()
.publishOn(Schedulers.parallel())
.onErrorResume(throwable ->
CosmosExceptionUtils.exceptionHandler("Failed to create database", throwable))
@@ -501,6 +504,19 @@ public CosmosContainerProperties createContainerIfNotExists(CosmosEntityInformat
return response.getProperties();
}
+ private Mono createDatabaseIfNotExists() {
+ if (databaseThroughputConfig == null) {
+ return cosmosAsyncClient
+ .createDatabaseIfNotExists(this.databaseName);
+ } else {
+ ThroughputProperties throughputProperties = databaseThroughputConfig.isAutoScale()
+ ? ThroughputProperties.createAutoscaledThroughput(databaseThroughputConfig.getRequestUnits())
+ : ThroughputProperties.createManualThroughput(databaseThroughputConfig.getRequestUnits());
+ return cosmosAsyncClient
+ .createDatabaseIfNotExists(this.databaseName, throughputProperties);
+ }
+ }
+
@Override
public CosmosContainerProperties getContainerProperties(String containerName) {
final CosmosContainerResponse response = cosmosAsyncClient.getDatabase(this.databaseName)
diff --git a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java
index 0e0d8ede36a2a..44566c01130b5 100644
--- a/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java
+++ b/sdk/cosmos/azure-spring-data-cosmos/src/main/java/com/azure/spring/data/cosmos/core/ReactiveCosmosTemplate.java
@@ -7,6 +7,7 @@
import com.azure.cosmos.CosmosAsyncDatabase;
import com.azure.cosmos.models.CosmosContainerProperties;
import com.azure.cosmos.models.CosmosContainerResponse;
+import com.azure.cosmos.models.CosmosDatabaseResponse;
import com.azure.cosmos.models.CosmosItemRequestOptions;
import com.azure.cosmos.models.CosmosQueryRequestOptions;
import com.azure.cosmos.models.FeedResponse;
@@ -18,6 +19,7 @@
import com.azure.spring.data.cosmos.CosmosFactory;
import com.azure.spring.data.cosmos.common.CosmosUtils;
import com.azure.spring.data.cosmos.config.CosmosConfig;
+import com.azure.spring.data.cosmos.config.DatabaseThroughputConfig;
import com.azure.spring.data.cosmos.core.convert.MappingCosmosConverter;
import com.azure.spring.data.cosmos.core.generator.CountQueryGenerator;
import com.azure.spring.data.cosmos.core.generator.FindQuerySpecGenerator;
@@ -61,6 +63,7 @@ public class ReactiveCosmosTemplate implements ReactiveCosmosOperations, Applica
private final boolean queryMetricsEnabled;
private final CosmosAsyncClient cosmosAsyncClient;
private final IsNewAwareAuditingHandler cosmosAuditingHandler;
+ private final DatabaseThroughputConfig databaseThroughputConfig;
private ApplicationContext applicationContext;
@@ -114,6 +117,7 @@ public ReactiveCosmosTemplate(CosmosFactory cosmosFactory,
this.responseDiagnosticsProcessor = cosmosConfig.getResponseDiagnosticsProcessor();
this.queryMetricsEnabled = cosmosConfig.isQueryMetricsEnabled();
this.cosmosAuditingHandler = cosmosAuditingHandler;
+ this.databaseThroughputConfig = cosmosConfig.getDatabaseThroughputConfig();
}
/**
@@ -146,8 +150,7 @@ public void setApplicationContext(@NonNull ApplicationContext applicationContext
@Override
public Mono createContainerIfNotExists(CosmosEntityInformation, ?> information) {
- return cosmosAsyncClient
- .createDatabaseIfNotExists(this.databaseName)
+ return createDatabaseIfNotExists()
.publishOn(Schedulers.parallel())
.onErrorResume(throwable ->
CosmosExceptionUtils.exceptionHandler("Failed to create database", throwable))
@@ -188,6 +191,19 @@ public Mono createContainerIfNotExists(CosmosEntityInfo
}
+ private Mono createDatabaseIfNotExists() {
+ if (databaseThroughputConfig == null) {
+ return cosmosAsyncClient
+ .createDatabaseIfNotExists(this.databaseName);
+ } else {
+ ThroughputProperties throughputProperties = databaseThroughputConfig.isAutoScale()
+ ? ThroughputProperties.createAutoscaledThroughput(databaseThroughputConfig.getRequestUnits())
+ : ThroughputProperties.createManualThroughput(databaseThroughputConfig.getRequestUnits());
+ return cosmosAsyncClient
+ .createDatabaseIfNotExists(this.databaseName, throughputProperties);
+ }
+ }
+
@Override
public Mono getContainerProperties(String containerName) {
return cosmosAsyncClient.getDatabase(this.databaseName)
diff --git a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
index 3b9ea6a6f1654..ebbe3c91f9c8c 100644
--- a/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
+++ b/sdk/costmanagement/azure-resourcemanager-costmanagement/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml b/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml
index a0d7bc30ebc23..3df4427d71234 100644
--- a/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml
+++ b/sdk/customerinsights/azure-resourcemanager-customerinsights/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/databox/azure-resourcemanager-databox/pom.xml b/sdk/databox/azure-resourcemanager-databox/pom.xml
index a53824c31b667..4eddc73900c42 100644
--- a/sdk/databox/azure-resourcemanager-databox/pom.xml
+++ b/sdk/databox/azure-resourcemanager-databox/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml
index e93ad9bd94378..1fb487ca0db1b 100644
--- a/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml
+++ b/sdk/databoxedge/azure-resourcemanager-databoxedge/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/databricks/azure-resourcemanager-databricks/pom.xml b/sdk/databricks/azure-resourcemanager-databricks/pom.xml
index 6b3dd0f361d64..c51edc5a7f54d 100644
--- a/sdk/databricks/azure-resourcemanager-databricks/pom.xml
+++ b/sdk/databricks/azure-resourcemanager-databricks/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/datadog/azure-resourcemanager-datadog/pom.xml b/sdk/datadog/azure-resourcemanager-datadog/pom.xml
index 0d707b9198473..57623845c5f51 100644
--- a/sdk/datadog/azure-resourcemanager-datadog/pom.xml
+++ b/sdk/datadog/azure-resourcemanager-datadog/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml
index 3e4d19a6e9195..867c27475feaf 100644
--- a/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml
+++ b/sdk/datafactory/azure-resourcemanager-datafactory/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
@@ -60,7 +60,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml b/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml
index 81e30a8533ada..9accc03ac0498 100644
--- a/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml
+++ b/sdk/datalakeanalytics/azure-resourcemanager-datalakeanalytics/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml
index 989318ab3e854..41e9ae9d8744b 100644
--- a/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml
+++ b/sdk/datalakestore/azure-resourcemanager-datalakestore/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
index bbd6b31dbf3e2..ba69fa9d0cfc7 100644
--- a/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
+++ b/sdk/datamigration/azure-resourcemanager-datamigration/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
index d5973b2d9a0ba..a4fb4f08ba376 100644
--- a/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
+++ b/sdk/delegatednetwork/azure-resourcemanager-delegatednetwork/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
index 47345fa5f3f09..bb0d411834708 100644
--- a/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
+++ b/sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml
index 968beef978cbd..97518b7e4d040 100644
--- a/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml
+++ b/sdk/deviceprovisioningservices/azure-resourcemanager-deviceprovisioningservices/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
@@ -66,7 +66,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml b/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml
index bc366abcfff07..8e38f1348696d 100644
--- a/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml
+++ b/sdk/deviceupdate/azure-iot-deviceupdate/pom.xml
@@ -31,12 +31,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
@@ -47,7 +47,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
index a7a358933fe69..940bb3aa00cd0 100644
--- a/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
+++ b/sdk/devspaces/azure-resourcemanager-devspaces/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
index 9da2332771465..4a30c0f966d75 100644
--- a/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
+++ b/sdk/devtestlabs/azure-resourcemanager-devtestlabs/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml
index 67b68ac86b6f2..0a148aedd686f 100644
--- a/sdk/digitaltwins/azure-digitaltwins-core/pom.xml
+++ b/sdk/digitaltwins/azure-digitaltwins-core/pom.xml
@@ -45,29 +45,29 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
azure-core-serializer-json-jackson
- 1.2.7
+ 1.2.8
com.fasterxml.jackson.core
jackson-annotations
- 2.12.4
+ 2.12.5
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -79,7 +79,7 @@
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
@@ -132,7 +132,7 @@
- com.fasterxml.jackson.core:jackson-annotations:[2.12.4]
+ com.fasterxml.jackson.core:jackson-annotations:[2.12.5]
diff --git a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
index 207f9e96caf11..af90b4a4f6f90 100644
--- a/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
+++ b/sdk/digitaltwins/azure-resourcemanager-digitaltwins/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
@@ -66,7 +66,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/e2e/pom.xml b/sdk/e2e/pom.xml
index 8a67ffd690bbc..c60a07a0a988d 100644
--- a/sdk/e2e/pom.xml
+++ b/sdk/e2e/pom.xml
@@ -23,7 +23,7 @@
com.azure
azure-core
- 1.21.0-beta.1
+ 1.22.0-beta.1
com.azure
@@ -76,7 +76,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/elastic/azure-resourcemanager-elastic/pom.xml b/sdk/elastic/azure-resourcemanager-elastic/pom.xml
index e6e55e0d3e1ac..7f88569ca7d84 100644
--- a/sdk/elastic/azure-resourcemanager-elastic/pom.xml
+++ b/sdk/elastic/azure-resourcemanager-elastic/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md b/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md
index 3b5b81d5689a1..a9b8420873adf 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md
+++ b/sdk/eventgrid/azure-messaging-eventgrid/CHANGELOG.md
@@ -3,10 +3,17 @@
## 4.7.0-beta.1 (Unreleased)
### Features Added
-
-### Breaking Changes
-
-### Bugs Fixed
+- Added new Api Management service system events, `ApiManagementApiCreatedEventData`, `ApiManagementApiDeletedEventData`,
+ `ApiManagementApiReleaseCreatedEventData`, `ApiManagementApiReleaseDeletedEventData`,
+ `ApiManagementApiReleaseUpdatedEventData`, `ApiManagementApiUpdatedEventData`, `ApiManagementProductCreatedEventData`,
+ `ApiManagementProductDeletedEventData`, `ApiManagementProductUpdatedEventData`,
+ `ApiManagementSubscriptionCreatedEventData`, `ApiManagementSubscriptionDeletedEventData`,
+ `ApiManagementSubscriptionUpdatedEventData`,`ApiManagementUserCreatedEventData`, `ApiManagementUserDeletedEventData`,
+ `ApiManagementUserUpdatedEventData`.
+- Added a new Media service system event, `MediaLiveEventChannelArchiveHeartbeatEventData`.
+- Added a new Communication service system event, `AcsUserDisconnectedEventData`.
+- Added fields `transcriptionLanguage`, `transcriptionState`, `ingestDriftValue`, `lastFragmentArrivalTime`
+ to system event classes `MediaLiveEventIngestHeartbeatEventData`.
### Other Changes
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml
index 121bc4fb00b82..4a9f2531003f4 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/pom.xml
+++ b/sdk/eventgrid/azure-messaging-eventgrid/pom.xml
@@ -68,19 +68,19 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
azure-core-serializer-json-jackson
- 1.2.7
+ 1.2.8
test
@@ -116,7 +116,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -128,7 +128,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
index cf348cce11516..877a74a540808 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/SystemEventNames.java
@@ -24,6 +24,22 @@
import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData;
+import com.azure.messaging.eventgrid.systemevents.AcsUserDisconnectedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData;
import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData;
@@ -70,6 +86,7 @@
import com.azure.messaging.eventgrid.systemevents.MediaJobProcessingEventData;
import com.azure.messaging.eventgrid.systemevents.MediaJobScheduledEventData;
import com.azure.messaging.eventgrid.systemevents.MediaJobStateChangeEventData;
+import com.azure.messaging.eventgrid.systemevents.MediaLiveEventChannelArchiveHeartbeatEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventConnectionRejectedEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderConnectedEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderDisconnectedEventData;
@@ -142,6 +159,68 @@
public final class SystemEventNames {
// Keep this sorted by the name of the service publishing the events.
+ // ApiManagement events.
+ /**
+ * indicate an event of ApiCreated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_CREATED = "Microsoft.ApiManagement.ApiCreated";
+ /**
+ * indicate an event of ApiDeleted in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_DELETED = "Microsoft.ApiManagement.ApiDeleted";
+ /**
+ * indicate an event of ApiReleaseCreated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_RELEASE_CREATED = "Microsoft.ApiManagement.ApiReleaseCreated";
+ /**
+ * indicate an event of ApiReleaseDeleted in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_RELEASE_DELETED = "Microsoft.ApiManagement.ApiReleaseDeleted";
+ /**
+ * indicate an event of ApiReleaseUpdated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_RELEASE_UPDATED = "Microsoft.ApiManagement.ApiReleaseUpdated";
+ /**
+ * indicate an event of ApiUpdated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_API_UPDATED = "Microsoft.ApiManagement.ApiUpdated";
+ /**
+ * indicate an event of ProductCreated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_PRODUCT_CREATED = "Microsoft.ApiManagement.ProductCreated";
+ /**
+ * indicate an event of ProductDeleted in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_PRODUCT_DELETED = "Microsoft.ApiManagement.ProductDeleted";
+ /**
+ * indicate an event of ProductUpdated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_PRODUCT_UPDATED = "Microsoft.ApiManagement.ProductUpdated";
+ /**
+ * indicate an event of SubscriptionCreated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_CREATED = "Microsoft.ApiManagement.SubscriptionCreated";
+ /**
+ * indicate an event of SubscriptionDeleted in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_DELETED = "Microsoft.ApiManagement.SubscriptionDeleted";
+ /**
+ * indicate an event of SubscriptionUpdated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_UPDATED = "Microsoft.ApiManagement.SubscriptionUpdated";
+ /**
+ * indicate an event of UserCreated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_USER_CREATED = "Microsoft.ApiManagement.UserCreated";
+ /**
+ * indicate an event of UserDeleted in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_USER_DELETED = "Microsoft.ApiManagement.UserDeleted";
+ /**
+ * indicate an event of UserUpdated in ApiManagement.
+ */
+ public static final String API_MANAGEMENT_USER_UPDATED = "Microsoft.ApiManagement.UserUpdated";
+
// AppConfiguration events.
/**
* indicate an event of KeyValueDeleted in AppConfiguration.
@@ -300,6 +379,12 @@ public final class SystemEventNames {
*/
public static final String MEDIA_JOB_STATE_CHANGE = "Microsoft.Media.JobStateChange";
+ /**
+ * Media Services Live Event Channel Archive Heartbeat event.
+ */
+ public static final String MEDIA_LIVE_EVENT_CHANNEL_ARCHIVE_HEARTBEAT =
+ "Microsoft.Media.LiveEventChannelArchiveHeartbeat";
+
/**
* Media Services Live Event Connection Rejected event.
*/
@@ -450,7 +535,6 @@ public final class SystemEventNames {
"Microsoft.Communication.SMSDeliveryReportReceived";
public static final String COMMUNICATION_SMS_RECEIVED =
"Microsoft.Communication.SMSReceived";
-
public static final String COMMUNICATION_CHAT_MESSAGE_DELETED_IN_THREAD =
"Microsoft.Communication.ChatMessageDeletedInThread";
public static final String COMMUNICATION_CHAT_MESSAGE_EDITED_IN_THREAD =
@@ -461,6 +545,8 @@ public final class SystemEventNames {
"Microsoft.Communication.ChatThreadParticipantAdded";
public static final String COMMUNICATION_CHAT_PARTICIPANT_ADDED_TO_THREAD_WITH_USER =
"Microsoft.Communication.ChatParticipantAddedToThreadWithUser";
+ public static final String COMMUNICATION_USER_DISCONNECTED =
+ "Microsoft.Communication.UserDisconnected";
/**
* Schema of the Data property of an EventGridEvent for a Microsoft.ContainerService.NewKubernetesVersionAvailable
@@ -547,6 +633,23 @@ public final class SystemEventNames {
private static final Map> SYSTEM_EVENT_MAPPINGS = new HashMap>() {
{
+ // API events.
+ put(API_MANAGEMENT_API_CREATED, ApiManagementApiCreatedEventData.class);
+ put(API_MANAGEMENT_API_DELETED, ApiManagementApiDeletedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_CREATED, ApiManagementApiReleaseCreatedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_DELETED, ApiManagementApiReleaseDeletedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_UPDATED, ApiManagementApiReleaseUpdatedEventData.class);
+ put(API_MANAGEMENT_API_UPDATED, ApiManagementApiUpdatedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_CREATED, ApiManagementProductCreatedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_DELETED, ApiManagementProductDeletedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_UPDATED, ApiManagementProductUpdatedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_CREATED, ApiManagementSubscriptionCreatedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_DELETED, ApiManagementSubscriptionDeletedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_UPDATED, ApiManagementSubscriptionUpdatedEventData.class);
+ put(API_MANAGEMENT_USER_CREATED, ApiManagementUserCreatedEventData.class);
+ put(API_MANAGEMENT_USER_DELETED, ApiManagementUserDeletedEventData.class);
+ put(API_MANAGEMENT_USER_UPDATED, ApiManagementUserUpdatedEventData.class);
+
// AppConfiguration events.
put(APP_CONFIGURATION_KEY_VALUE_DELETED, AppConfigurationKeyValueDeletedEventData.class);
put(APP_CONFIGURATION_KEY_VALUE_MODIFIED, AppConfigurationKeyValueModifiedEventData.class);
@@ -591,6 +694,7 @@ public final class SystemEventNames {
put(MEDIA_JOB_PROCESSING, MediaJobProcessingEventData.class);
put(MEDIA_JOB_SCHEDULED, MediaJobScheduledEventData.class);
put(MEDIA_JOB_STATE_CHANGE, MediaJobStateChangeEventData.class);
+ put(MEDIA_LIVE_EVENT_CHANNEL_ARCHIVE_HEARTBEAT, MediaLiveEventChannelArchiveHeartbeatEventData.class);
put(MEDIA_LIVE_EVENT_CONNECTION_REJECTED, MediaLiveEventConnectionRejectedEventData.class);
put(MEDIA_LIVE_EVENT_ENCODER_CONNECTED, MediaLiveEventEncoderConnectedEventData.class);
put(MEDIA_LIVE_EVENT_ENCODER_DISCONNECTED, MediaLiveEventEncoderDisconnectedEventData.class);
@@ -654,6 +758,7 @@ public final class SystemEventNames {
put(COMMUNICATION_CHAT_THREAD_DELETED, AcsChatThreadDeletedEventData.class);
put(COMMUNICATION_CHAT_THREAD_PROPERTIES_UPDATED, AcsChatThreadPropertiesUpdatedEventData.class);
put(COMMUNICATION_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class);
+ put(COMMUNICATION_USER_DISCONNECTED, AcsUserDisconnectedEventData.class);
// Web events
put(WEB_APP_UPDATED, WebAppUpdatedEventData.class);
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
index f5b434cc1d7c9..adb8d5d58769a 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/implementation/SystemEventMappingNames.java
@@ -24,6 +24,22 @@
import com.azure.messaging.eventgrid.systemevents.AcsRecordingFileStatusUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsDeliveryReportReceivedEventData;
import com.azure.messaging.eventgrid.systemevents.AcsSmsReceivedEventData;
+import com.azure.messaging.eventgrid.systemevents.AcsUserDisconnectedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiReleaseUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementApiUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementProductUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementSubscriptionUpdatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserCreatedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserDeletedEventData;
+import com.azure.messaging.eventgrid.systemevents.ApiManagementUserUpdatedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueDeletedEventData;
import com.azure.messaging.eventgrid.systemevents.AppConfigurationKeyValueModifiedEventData;
import com.azure.messaging.eventgrid.systemevents.ContainerRegistryChartDeletedEventData;
@@ -70,6 +86,7 @@
import com.azure.messaging.eventgrid.systemevents.MediaJobProcessingEventData;
import com.azure.messaging.eventgrid.systemevents.MediaJobScheduledEventData;
import com.azure.messaging.eventgrid.systemevents.MediaJobStateChangeEventData;
+import com.azure.messaging.eventgrid.systemevents.MediaLiveEventChannelArchiveHeartbeatEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventConnectionRejectedEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderConnectedEventData;
import com.azure.messaging.eventgrid.systemevents.MediaLiveEventEncoderDisconnectedEventData;
@@ -233,6 +250,54 @@ public final class SystemEventMappingNames {
/** Schema of the Data property of an EventGridEvent for a Microsoft.Communication.SMSReceived event. */
public static final String ACS_SMS_RECEIVED = "Microsoft.Communication.SMSReceived";
+ /** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.UserDisconnected event. */
+ public static final String ACS_USER_DISCONNECTED = "Microsoft.Communication.UserDisconnected";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiCreated event. */
+ public static final String API_MANAGEMENT_API_CREATED = "Microsoft.ApiManagement.ApiCreated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiDeleted event. */
+ public static final String API_MANAGEMENT_API_DELETED = "Microsoft.ApiManagement.ApiDeleted";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseCreated event. */
+ public static final String API_MANAGEMENT_API_RELEASE_CREATED = "Microsoft.ApiManagement.ApiReleaseCreated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseDeleted event. */
+ public static final String API_MANAGEMENT_API_RELEASE_DELETED = "Microsoft.ApiManagement.ApiReleaseDeleted";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseUpdated event. */
+ public static final String API_MANAGEMENT_API_RELEASE_UPDATED = "Microsoft.ApiManagement.ApiReleaseUpdated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiUpdated event. */
+ public static final String API_MANAGEMENT_API_UPDATED = "Microsoft.ApiManagement.ApiUpdated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated event. */
+ public static final String API_MANAGEMENT_PRODUCT_CREATED = "Microsoft.ApiManagement.ProductCreated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductDeleted event. */
+ public static final String API_MANAGEMENT_PRODUCT_DELETED = "Microsoft.ApiManagement.ProductDeleted";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductUpdated event. */
+ public static final String API_MANAGEMENT_PRODUCT_UPDATED = "Microsoft.ApiManagement.ProductUpdated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionCreated event. */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_CREATED = "Microsoft.ApiManagement.SubscriptionCreated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionDeleted event. */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_DELETED = "Microsoft.ApiManagement.SubscriptionDeleted";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionUpdated event. */
+ public static final String API_MANAGEMENT_SUBSCRIPTION_UPDATED = "Microsoft.ApiManagement.SubscriptionUpdated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserCreated event. */
+ public static final String API_MANAGEMENT_USER_CREATED = "Microsoft.ApiManagement.UserCreated";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserDeleted event. */
+ public static final String API_MANAGEMENT_USER_DELETED = "Microsoft.ApiManagement.UserDeleted";
+
+ /** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserUpdated event. */
+ public static final String API_MANAGEMENT_USER_UPDATED = "Microsoft.ApiManagement.UserUpdated";
+
/** Schema of the Data property of an EventGridEvent for a Microsoft.AppConfiguration.KeyValueDeleted event. */
public static final String APP_CONFIGURATION_KEY_VALUE_DELETED = "Microsoft.AppConfiguration.KeyValueDeleted";
@@ -427,6 +492,13 @@ public final class SystemEventMappingNames {
/** Schema of the Data property of an EventGridEvent for a Microsoft.Media.JobStateChange event. */
public static final String MEDIA_JOB_STATE_CHANGE = "Microsoft.Media.JobStateChange";
+ /**
+ * Channel Archive heartbeat event data. Schema of the data property of an EventGridEvent for a
+ * Microsoft.Media.LiveEventChannelArchiveHeartbeat event.
+ */
+ public static final String MEDIA_LIVE_EVENT_CHANNEL_ARCHIVE_HEARTBEAT =
+ "Microsoft.Media.LiveEventChannelArchiveHeartbeat";
+
/**
* Encoder connection rejected event data. Schema of the data property of an EventGridEvent for a
* Microsoft.Media.LiveEventConnectionRejected event.
@@ -467,14 +539,14 @@ public final class SystemEventMappingNames {
"Microsoft.Media.LiveEventIncomingStreamsOutOfSync";
/**
- * Incoming video stream out of synch event data. Schema of the data property of an EventGridEvent for a
+ * Incoming video stream out of sync event data. Schema of the data property of an EventGridEvent for a
* Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync event.
*/
public static final String MEDIA_LIVE_EVENT_INCOMING_VIDEO_STREAMS_OUT_OF_SYNC =
"Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync";
/**
- * Ingest fragment dropped event data. Schema of the data property of an EventGridEvent for a
+ * Ingest heartbeat event data. Schema of the data property of an EventGridEvent for a
* Microsoft.Media.LiveEventIngestHeartbeat event.
*/
public static final String MEDIA_LIVE_EVENT_INGEST_HEARTBEAT = "Microsoft.Media.LiveEventIngestHeartbeat";
@@ -706,6 +778,22 @@ public final class SystemEventMappingNames {
put(ACS_RECORDING_FILE_STATUS_UPDATED, AcsRecordingFileStatusUpdatedEventData.class);
put(ACS_SMS_DELIVERY_REPORT_RECEIVED, AcsSmsDeliveryReportReceivedEventData.class);
put(ACS_SMS_RECEIVED, AcsSmsReceivedEventData.class);
+ put(ACS_USER_DISCONNECTED, AcsUserDisconnectedEventData.class);
+ put(API_MANAGEMENT_API_CREATED, ApiManagementApiCreatedEventData.class);
+ put(API_MANAGEMENT_API_DELETED, ApiManagementApiDeletedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_CREATED, ApiManagementApiReleaseCreatedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_DELETED, ApiManagementApiReleaseDeletedEventData.class);
+ put(API_MANAGEMENT_API_RELEASE_UPDATED, ApiManagementApiReleaseUpdatedEventData.class);
+ put(API_MANAGEMENT_API_UPDATED, ApiManagementApiUpdatedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_CREATED, ApiManagementProductCreatedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_DELETED, ApiManagementProductDeletedEventData.class);
+ put(API_MANAGEMENT_PRODUCT_UPDATED, ApiManagementProductUpdatedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_CREATED, ApiManagementSubscriptionCreatedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_DELETED, ApiManagementSubscriptionDeletedEventData.class);
+ put(API_MANAGEMENT_SUBSCRIPTION_UPDATED, ApiManagementSubscriptionUpdatedEventData.class);
+ put(API_MANAGEMENT_USER_CREATED, ApiManagementUserCreatedEventData.class);
+ put(API_MANAGEMENT_USER_DELETED, ApiManagementUserDeletedEventData.class);
+ put(API_MANAGEMENT_USER_UPDATED, ApiManagementUserUpdatedEventData.class);
put(APP_CONFIGURATION_KEY_VALUE_DELETED, AppConfigurationKeyValueDeletedEventData.class);
put(APP_CONFIGURATION_KEY_VALUE_MODIFIED, AppConfigurationKeyValueModifiedEventData.class);
put(CONTAINER_REGISTRY_CHART_DELETED, ContainerRegistryChartDeletedEventData.class);
@@ -760,6 +848,9 @@ public final class SystemEventMappingNames {
put(MEDIA_JOB_PROCESSING, MediaJobProcessingEventData.class);
put(MEDIA_JOB_SCHEDULED, MediaJobScheduledEventData.class);
put(MEDIA_JOB_STATE_CHANGE, MediaJobStateChangeEventData.class);
+ put(
+ MEDIA_LIVE_EVENT_CHANNEL_ARCHIVE_HEARTBEAT,
+ MediaLiveEventChannelArchiveHeartbeatEventData.class);
put(MEDIA_LIVE_EVENT_CONNECTION_REJECTED, MediaLiveEventConnectionRejectedEventData.class);
put(MEDIA_LIVE_EVENT_ENCODER_CONNECTED, MediaLiveEventEncoderConnectedEventData.class);
put(MEDIA_LIVE_EVENT_ENCODER_DISCONNECTED, MediaLiveEventEncoderDisconnectedEventData.class);
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java
new file mode 100644
index 0000000000000..d1e951299325e
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/AcsUserDisconnectedEventData.java
@@ -0,0 +1,39 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for an Microsoft.Communication.UserDisconnected event. */
+@Immutable
+public final class AcsUserDisconnectedEventData {
+ /*
+ * The communication identifier of the user who was disconnected
+ */
+ @JsonProperty(value = "userCommunicationIdentifier")
+ private CommunicationIdentifierModel userCommunicationIdentifier;
+
+ /**
+ * Get the userCommunicationIdentifier property: The communication identifier of the user who was disconnected.
+ *
+ * @return the userCommunicationIdentifier value.
+ */
+ public CommunicationIdentifierModel getUserCommunicationIdentifier() {
+ return this.userCommunicationIdentifier;
+ }
+
+ /**
+ * Set the userCommunicationIdentifier property: The communication identifier of the user who was disconnected.
+ *
+ * @param userCommunicationIdentifier the userCommunicationIdentifier value to set.
+ * @return the AcsUserDisconnectedEventData object itself.
+ */
+ public AcsUserDisconnectedEventData setUserCommunicationIdentifier(
+ CommunicationIdentifierModel userCommunicationIdentifier) {
+ this.userCommunicationIdentifier = userCommunicationIdentifier;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java
new file mode 100644
index 0000000000000..748a90d3b6a39
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiCreatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiCreated event. */
+@Immutable
+public final class ApiManagementApiCreatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiCreatedEventData object itself.
+ */
+ public ApiManagementApiCreatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java
new file mode 100644
index 0000000000000..8715a40fb5a79
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiDeletedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiDeleted event. */
+@Immutable
+public final class ApiManagementApiDeletedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiDeletedEventData object itself.
+ */
+ public ApiManagementApiDeletedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java
new file mode 100644
index 0000000000000..58773f274d996
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseCreatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseCreated event. */
+@Immutable
+public final class ApiManagementApiReleaseCreatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiReleaseCreatedEventData object itself.
+ */
+ public ApiManagementApiReleaseCreatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java
new file mode 100644
index 0000000000000..5f9ce47990ab7
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseDeletedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseDeleted event. */
+@Immutable
+public final class ApiManagementApiReleaseDeletedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiReleaseDeletedEventData object itself.
+ */
+ public ApiManagementApiReleaseDeletedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java
new file mode 100644
index 0000000000000..0b5b749fb0373
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiReleaseUpdatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiReleaseUpdated event. */
+@Immutable
+public final class ApiManagementApiReleaseUpdatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiReleaseUpdatedEventData object itself.
+ */
+ public ApiManagementApiReleaseUpdatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java
new file mode 100644
index 0000000000000..c8900a8ee06f6
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementApiUpdatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ApiUpdated event. */
+@Immutable
+public final class ApiManagementApiUpdatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementApiUpdatedEventData object itself.
+ */
+ public ApiManagementApiUpdatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java
new file mode 100644
index 0000000000000..c0892017a8c8e
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductCreatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductCreated event. */
+@Immutable
+public final class ApiManagementProductCreatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementProductCreatedEventData object itself.
+ */
+ public ApiManagementProductCreatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java
new file mode 100644
index 0000000000000..aa847f0cd739f
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductDeletedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductDeleted event. */
+@Immutable
+public final class ApiManagementProductDeletedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementProductDeletedEventData object itself.
+ */
+ public ApiManagementProductDeletedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java
new file mode 100644
index 0000000000000..b1598b3cd9095
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementProductUpdatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.ProductUpdated event. */
+@Immutable
+public final class ApiManagementProductUpdatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementProductUpdatedEventData object itself.
+ */
+ public ApiManagementProductUpdatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java
new file mode 100644
index 0000000000000..3dea7c830b866
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionCreatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionCreated event. */
+@Immutable
+public final class ApiManagementSubscriptionCreatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementSubscriptionCreatedEventData object itself.
+ */
+ public ApiManagementSubscriptionCreatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java
new file mode 100644
index 0000000000000..8b63c639d8ec0
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionDeletedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionDeleted event. */
+@Immutable
+public final class ApiManagementSubscriptionDeletedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementSubscriptionDeletedEventData object itself.
+ */
+ public ApiManagementSubscriptionDeletedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java
new file mode 100644
index 0000000000000..18c784b76eecd
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementSubscriptionUpdatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.SubscriptionUpdated event. */
+@Immutable
+public final class ApiManagementSubscriptionUpdatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementSubscriptionUpdatedEventData object itself.
+ */
+ public ApiManagementSubscriptionUpdatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java
new file mode 100644
index 0000000000000..d56758d404171
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserCreatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserCreated event. */
+@Immutable
+public final class ApiManagementUserCreatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementUserCreatedEventData object itself.
+ */
+ public ApiManagementUserCreatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java
new file mode 100644
index 0000000000000..50868104491e6
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserDeletedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserDeleted event. */
+@Immutable
+public final class ApiManagementUserDeletedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementUserDeletedEventData object itself.
+ */
+ public ApiManagementUserDeletedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java
new file mode 100644
index 0000000000000..8c060976f8393
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/ApiManagementUserUpdatedEventData.java
@@ -0,0 +1,44 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/** Schema of the Data property of an EventGridEvent for a Microsoft.ApiManagement.UserUpdated event. */
+@Immutable
+public final class ApiManagementUserUpdatedEventData {
+ /*
+ * The fully qualified ID of the resource that the compliance state change
+ * is for, including the resource name and resource type. Uses the format,
+ * `/subscriptions//resourceGroups//Microsoft.ApiManagement/service///`
+ */
+ @JsonProperty(value = "resourceUri")
+ private String resourceUri;
+
+ /**
+ * Get the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @return the resourceUri value.
+ */
+ public String getResourceUri() {
+ return this.resourceUri;
+ }
+
+ /**
+ * Set the resourceUri property: The fully qualified ID of the resource that the compliance state change is for,
+ * including the resource name and resource type. Uses the format,
+ * `/subscriptions/<SubscriptionID>/resourceGroups/<ResourceGroup>/Microsoft.ApiManagement/service/<ServiceName>/<ResourceType>/<ResourceName>`.
+ *
+ * @param resourceUri the resourceUri value to set.
+ * @return the ApiManagementUserUpdatedEventData object itself.
+ */
+ public ApiManagementUserUpdatedEventData setResourceUri(String resourceUri) {
+ this.resourceUri = resourceUri;
+ return this;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java
new file mode 100644
index 0000000000000..9fbc66541c6be
--- /dev/null
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventChannelArchiveHeartbeatEventData.java
@@ -0,0 +1,45 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+// Code generated by Microsoft (R) AutoRest Code Generator.
+
+package com.azure.messaging.eventgrid.systemevents;
+
+import com.azure.core.annotation.Immutable;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ * Channel Archive heartbeat event data. Schema of the data property of an EventGridEvent for a
+ * Microsoft.Media.LiveEventChannelArchiveHeartbeat event.
+ */
+@Immutable
+public final class MediaLiveEventChannelArchiveHeartbeatEventData {
+ /*
+ * Gets the channel latency in ms.
+ */
+ @JsonProperty(value = "channelLatencyMs", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private String channelLatencyMs;
+
+ /*
+ * Gets the latency result code.
+ */
+ @JsonProperty(value = "latencyResultCode", required = true, access = JsonProperty.Access.WRITE_ONLY)
+ private String latencyResultCode;
+
+ /**
+ * Get the channelLatencyMs property: Gets the channel latency in ms.
+ *
+ * @return the channelLatencyMs value.
+ */
+ public String getChannelLatencyMs() {
+ return this.channelLatencyMs;
+ }
+
+ /**
+ * Get the latencyResultCode property: Gets the latency result code.
+ *
+ * @return the latencyResultCode value.
+ */
+ public String getLatencyResultCode() {
+ return this.latencyResultCode;
+ }
+}
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java
index 61dda3af9486a..66b70cb495da3 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIncomingVideoStreamsOutOfSyncEventData.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Incoming video stream out of synch event data. Schema of the data property of an EventGridEvent for a
+ * Incoming video stream out of sync event data. Schema of the data property of an EventGridEvent for a
* Microsoft.Media.LiveEventIncomingVideoStreamsOutOfSync event.
*/
@Immutable
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java
index fdfd92ff10942..f76c7ed3873d9 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java
+++ b/sdk/eventgrid/azure-messaging-eventgrid/src/main/java/com/azure/messaging/eventgrid/systemevents/MediaLiveEventIngestHeartbeatEventData.java
@@ -8,7 +8,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
/**
- * Ingest fragment dropped event data. Schema of the data property of an EventGridEvent for a
+ * Ingest heartbeat event data. Schema of the data property of an EventGridEvent for a
* Microsoft.Media.LiveEventIngestHeartbeat event.
*/
@Immutable
@@ -25,6 +25,18 @@ public final class MediaLiveEventIngestHeartbeatEventData {
@JsonProperty(value = "trackName", access = JsonProperty.Access.WRITE_ONLY)
private String trackName;
+ /*
+ * Gets the Live Transcription language.
+ */
+ @JsonProperty(value = "transcriptionLanguage", access = JsonProperty.Access.WRITE_ONLY)
+ private String transcriptionLanguage;
+
+ /*
+ * Gets the Live Transcription state.
+ */
+ @JsonProperty(value = "transcriptionState", access = JsonProperty.Access.WRITE_ONLY)
+ private String transcriptionState;
+
/*
* Gets the bitrate of the track.
*/
@@ -37,6 +49,18 @@ public final class MediaLiveEventIngestHeartbeatEventData {
@JsonProperty(value = "incomingBitrate", access = JsonProperty.Access.WRITE_ONLY)
private Long incomingBitrate;
+ /*
+ * Gets the track ingest drift value.
+ */
+ @JsonProperty(value = "ingestDriftValue", access = JsonProperty.Access.WRITE_ONLY)
+ private String ingestDriftValue;
+
+ /*
+ * Gets the arrival UTC time of the last fragment.
+ */
+ @JsonProperty(value = "lastFragmentArrivalTime", access = JsonProperty.Access.WRITE_ONLY)
+ private String lastFragmentArrivalTime;
+
/*
* Gets the last timestamp.
*/
@@ -103,6 +127,24 @@ public String getTrackName() {
return this.trackName;
}
+ /**
+ * Get the transcriptionLanguage property: Gets the Live Transcription language.
+ *
+ * @return the transcriptionLanguage value.
+ */
+ public String getTranscriptionLanguage() {
+ return this.transcriptionLanguage;
+ }
+
+ /**
+ * Get the transcriptionState property: Gets the Live Transcription state.
+ *
+ * @return the transcriptionState value.
+ */
+ public String getTranscriptionState() {
+ return this.transcriptionState;
+ }
+
/**
* Get the bitrate property: Gets the bitrate of the track.
*
@@ -121,6 +163,24 @@ public Long getIncomingBitrate() {
return this.incomingBitrate;
}
+ /**
+ * Get the ingestDriftValue property: Gets the track ingest drift value.
+ *
+ * @return the ingestDriftValue value.
+ */
+ public String getIngestDriftValue() {
+ return this.ingestDriftValue;
+ }
+
+ /**
+ * Get the lastFragmentArrivalTime property: Gets the arrival UTC time of the last fragment.
+ *
+ * @return the lastFragmentArrivalTime value.
+ */
+ public String getLastFragmentArrivalTime() {
+ return this.lastFragmentArrivalTime;
+ }
+
/**
* Get the lastTimestamp property: Gets the last timestamp.
*
diff --git a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
index c702976e9a06e..89aabb922e36d 100644
--- a/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
+++ b/sdk/eventgrid/azure-messaging-eventgrid/swagger/README.md
@@ -74,24 +74,25 @@ custom-types: CloudEvent,EventGridEvent
model-override-setter-from-superclass: true
input-file:
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
-- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/504bc4ece6c4a1ad983f148237c71a3f72fc977f/specification/eventgrid/data-plane/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Storage/stable/2018-01-01/Storage.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.EventHub/stable/2018-01-01/EventHub.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Resources/stable/2018-01-01/Resources.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.EventGrid/stable/2018-01-01/EventGrid.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Devices/stable/2018-01-01/IotHub.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.ContainerRegistry/stable/2018-01-01/ContainerRegistry.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.ServiceBus/stable/2018-01-01/ServiceBus.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Media/stable/2018-01-01/MediaServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Maps/stable/2018-01-01/Maps.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.AppConfiguration/stable/2018-01-01/AppConfiguration.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.SignalRService/stable/2018-01-01/SignalRService.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.KeyVault/stable/2018-01-01/KeyVault.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.MachineLearningServices/stable/2018-01-01/MachineLearningServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Cache/stable/2018-01-01/RedisCache.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Web/stable/2018-01-01/Web.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.Communication/stable/2018-01-01/AzureCommunicationServices.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.PolicyInsights/stable/2018-01-01/PolicyInsights.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.ContainerService/stable/2018-01-01/ContainerService.json
+- https://raw.githubusercontent.com/Azure/azure-rest-api-specs/cd92e4a9c00d6cac0acfe7996796fdc49c36ffad/specification/eventgrid/data-plane/Microsoft.ApiManagement/stable/2018-01-01/APIManagement.json
```
diff --git a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml
index 9f2e3e2175d8c..acc632fd2d15d 100644
--- a/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml
+++ b/sdk/eventgrid/azure-resourcemanager-eventgrid/pom.xml
@@ -44,19 +44,19 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
diff --git a/sdk/eventgrid/microsoft-azure-eventgrid/pom.xml b/sdk/eventgrid/microsoft-azure-eventgrid/pom.xml
index f6b669c29faf2..6917a97a52617 100644
--- a/sdk/eventgrid/microsoft-azure-eventgrid/pom.xml
+++ b/sdk/eventgrid/microsoft-azure-eventgrid/pom.xml
@@ -114,7 +114,7 @@
org.apache.maven.plugins
maven-javadoc-plugin
- 3.1.1
+ 3.3.1
*.implementation.*;*.utils.*;com.microsoft.schemas._2003._10.serialization;*.blob.core.search
diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md
index 3b672923cfa2b..1be659e9473d2 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md
+++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/CHANGELOG.md
@@ -114,7 +114,7 @@
- Updated version of `azure-messaging-eventhubs` to `5.1.0-beta.1` that supports receiving events in batches.
## 1.0.3 (2020-04-08)
-- Fix bug where processor would hang after a reconnect due to being unable to load balance partitions.
+- Fix bug where processor would not respond after a reconnect due to being unable to load balance partitions.
## 1.0.2 (2020-02-12)
- Dependency fixed so `EventProcessor` consumers can use blocking method calls in their code.
diff --git a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml
index 500fccb296af6..5e52a20fd15ba 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml
+++ b/sdk/eventhubs/azure-messaging-eventhubs-checkpointstore-blob/pom.xml
@@ -85,7 +85,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/eventhubs/azure-messaging-eventhubs-track1-perf/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs-track1-perf/pom.xml
index a567a0db05996..8fc63c6ffe8b0 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs-track1-perf/pom.xml
+++ b/sdk/eventhubs/azure-messaging-eventhubs-track1-perf/pom.xml
@@ -28,7 +28,7 @@
com.fasterxml.jackson.core
jackson-databind
- 2.12.4
+ 2.12.5
com.microsoft.azure
@@ -78,7 +78,7 @@
com.microsoft.azure:azure-eventhubs-eph:[3.3.0]
- com.fasterxml.jackson.core:jackson-databind:[2.12.4]
+ com.fasterxml.jackson.core:jackson-databind:[2.12.5]
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml
index c6f449f9864b8..c9e3954682d41 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/pom.xml
+++ b/sdk/eventhubs/azure-messaging-eventhubs/pom.xml
@@ -37,7 +37,7 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
@@ -55,7 +55,7 @@
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
@@ -80,7 +80,7 @@
io.projectreactor
reactor-test
- 3.4.9
+ 3.4.10
test
diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClient.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClient.java
index 70d60783126e6..a48d6518acba1 100644
--- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClient.java
+++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventHubConsumerAsyncClient.java
@@ -5,6 +5,7 @@
import com.azure.core.amqp.implementation.AmqpReceiveLink;
import com.azure.core.amqp.implementation.MessageSerializer;
+import com.azure.core.amqp.implementation.RetryUtil;
import com.azure.core.amqp.implementation.StringUtil;
import com.azure.core.annotation.ReturnType;
import com.azure.core.annotation.ServiceClient;
@@ -352,15 +353,37 @@ private EventHubPartitionAsyncConsumer createPartitionConsumer(String linkName,
getEventHubName(), consumerGroup, partitionId);
final AtomicReference> initialPosition = new AtomicReference<>(() -> startingPosition);
- final Flux receiveLinkMono = connectionProcessor
+
+ // The Mono, when subscribed, creates a AmqpReceiveLink in the AmqpConnection emitted by the connectionProcessor
+ //
+ final Mono receiveLinkMono = connectionProcessor
.flatMap(connection -> {
logger.info("connectionId[{}] linkName[{}] Creating receive consumer for partition '{}'",
connection.getId(), linkName, partitionId);
return connection.createReceiveLink(linkName, entityPath, initialPosition.get().get(), receiveOptions);
- })
- .repeat();
-
- final AmqpReceiveLinkProcessor linkMessageProcessor = receiveLinkMono.subscribeWith(
+ });
+
+ // A Mono that resubscribes to 'receiveLinkMono' to retry the creation of AmqpReceiveLink.
+ //
+ // The scenarios where this retry helps are -
+ // [1]. When we try to create a link on a session being disposed but connection is healthy, the retry can
+ // eventually create a new session then the link.
+ // [2]. When we try to create a new session (to host the new link) but on a connection being disposed,
+ // the retry can eventually receives a new connection and then proceed with creating session and link.
+ //
+ final Mono retriableReceiveLinkMono = RetryUtil.withRetry(receiveLinkMono,
+ connectionProcessor.getRetryOptions(),
+ "Failed to create receive link " + linkName,
+ true);
+
+ // A Flux that produces a new AmqpReceiveLink each time it receives a request from the below
+ // 'AmqpReceiveLinkProcessor'. Obviously, the processor requests a link when there is a downstream subscriber.
+ // It also requests a new link (i.e. retry) when the current link it holds gets terminated
+ // (e.g., when the service decides to close that link).
+ //
+ final Flux receiveLinkFlux = retriableReceiveLinkMono.repeat();
+
+ final AmqpReceiveLinkProcessor linkMessageProcessor = receiveLinkFlux.subscribeWith(
new AmqpReceiveLinkProcessor(entityPath, prefetchCount, connectionProcessor));
return new EventHubPartitionAsyncConsumer(linkMessageProcessor, messageSerializer, getFullyQualifiedNamespace(),
diff --git a/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml b/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml
index cd438db060c16..7e7efa7fb15fb 100644
--- a/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml
+++ b/sdk/eventhubs/microsoft-azure-eventhubs-eph/pom.xml
@@ -46,7 +46,7 @@
com.google.code.gson
gson
- 2.8.7
+ 2.8.8
diff --git a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/pom.xml b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/pom.xml
index 2b985cd5405da..72ff6e89203c0 100644
--- a/sdk/extendedlocation/azure-resourcemanager-extendedlocation/pom.xml
+++ b/sdk/extendedlocation/azure-resourcemanager-extendedlocation/pom.xml
@@ -44,12 +44,12 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-management
- 1.4.1
+ 1.4.2
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer-perf/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer-perf/pom.xml
index cfb93b03433ee..29fa2a7aa4389 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer-perf/pom.xml
+++ b/sdk/formrecognizer/azure-ai-formrecognizer-perf/pom.xml
@@ -32,7 +32,7 @@
com.azure
azure-ai-formrecognizer
- 3.2.0-beta.1
+ 4.0.0-beta.1
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/App.java b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/App.java
index 2bf865747cb3c..1f7e1ad008d91 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/App.java
+++ b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/App.java
@@ -19,7 +19,7 @@
* Configurations} section. Then run the App's main method.
*/
public class App {
-
+
/**
* Main method to invoke performance tests
*
@@ -27,6 +27,6 @@ public class App {
*/
public static void main(String[] args) {
PerfStressProgram.run(
- new Class>[]{CustomModelRecognitionTest.class}, args);
+ new Class>[]{DocumentModelAnalysisTest.class}, args);
}
}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/CustomModelRecognitionTest.java b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/DocumentModelAnalysisTest.java
similarity index 59%
rename from sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/CustomModelRecognitionTest.java
rename to sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/DocumentModelAnalysisTest.java
index 8589c37bc3e0a..a88ff1556cf5f 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/CustomModelRecognitionTest.java
+++ b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/DocumentModelAnalysisTest.java
@@ -3,47 +3,44 @@
package com.azure.ai.formrecognizer.perf;
-import com.azure.ai.formrecognizer.models.RecognizedForm;
+import com.azure.ai.formrecognizer.models.AnalyzeResult;
import com.azure.ai.formrecognizer.perf.core.ServiceTest;
import com.azure.perf.test.core.PerfStressOptions;
import reactor.core.publisher.Mono;
-import java.util.List;
-
/**
- * Performs custom model recognition operations.
+ * Performs document analysis using a prebuilt model operation.
*/
-public class CustomModelRecognitionTest extends ServiceTest {
+public class DocumentModelAnalysisTest extends ServiceTest {
private static final String URL_TEST_FILE_FORMAT = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/"
+ "master/sdk/formrecognizer/azure-ai-formrecognizer/src/test/resources/sample_files/Test/";
- private static final String FORM_JPG = "Form_1.jpg";
+ private static final String RECEIPT_CONTOSO_PNG = "contoso-receipt.png";
/**
- * The CustomModelRecognitionTest class.
+ * The DocumentModelAnalysisTest class.
*
* @param options the configurable options for perf testing this class
*/
- public CustomModelRecognitionTest(PerfStressOptions options) {
+ public DocumentModelAnalysisTest(PerfStressOptions options) {
super(options);
}
@Override
public void run() {
- List recognizedForms =
- formrecognizerClient.beginRecognizeCustomFormsFromUrl(modelId, URL_TEST_FILE_FORMAT + FORM_JPG)
+ AnalyzeResult analyzedResult =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl("prebuilt-receipt",
+ URL_TEST_FILE_FORMAT + RECEIPT_CONTOSO_PNG)
.getFinalResult();
- recognizedForms.stream()
- .forEach(recognizedForm -> {
- assert recognizedForm.getFields() != null;
- });
-
+ assert analyzedResult.getPages() != null;
+ assert analyzedResult.getModelId() == "prebuilt-receipt";
}
@Override
public Mono runAsync() {
- return formrecognizerAsyncClient
- .beginRecognizeCustomFormsFromUrl(modelId, URL_TEST_FILE_FORMAT + FORM_JPG)
+ return documentAnalysisAsyncClient
+ .beginAnalyzeDocumentFromUrl("prebuilt-receipt",
+ URL_TEST_FILE_FORMAT + RECEIPT_CONTOSO_PNG)
.last()
.flatMap(pollResponse -> {
if (pollResponse.getStatus().isComplete()) {
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/core/ServiceTest.java b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/core/ServiceTest.java
index b80e7265c7547..cf319752a6416 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/core/ServiceTest.java
+++ b/sdk/formrecognizer/azure-ai-formrecognizer-perf/src/main/java/com/azure/ai/formrecognizer/perf/core/ServiceTest.java
@@ -3,14 +3,14 @@
package com.azure.ai.formrecognizer.perf.core;
-import com.azure.ai.formrecognizer.FormRecognizerAsyncClient;
-import com.azure.ai.formrecognizer.FormRecognizerClient;
-import com.azure.ai.formrecognizer.models.FormRecognizerOperationResult;
-import com.azure.ai.formrecognizer.training.FormTrainingAsyncClient;
-import com.azure.ai.formrecognizer.training.FormTrainingClient;
-import com.azure.ai.formrecognizer.training.FormTrainingClientBuilder;
-import com.azure.ai.formrecognizer.training.models.CustomFormModel;
-import com.azure.ai.formrecognizer.training.models.TrainingOptions;
+import com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient;
+import com.azure.ai.formrecognizer.DocumentAnalysisClient;
+import com.azure.ai.formrecognizer.administration.DocumentModelAdministrationAsyncClient;
+import com.azure.ai.formrecognizer.administration.DocumentModelAdministrationClient;
+import com.azure.ai.formrecognizer.administration.DocumentModelAdministrationClientBuilder;
+import com.azure.ai.formrecognizer.administration.models.BuildModelOptions;
+import com.azure.ai.formrecognizer.administration.models.DocumentModel;
+import com.azure.ai.formrecognizer.models.DocumentOperationResult;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.util.Configuration;
import com.azure.core.util.CoreUtils;
@@ -26,10 +26,10 @@ public abstract class ServiceTest extends Pe
private static final String CONFIGURATION_ERROR = "Configuration %s must be set in either environment variables "
+ "or system properties.%n";
- protected final FormRecognizerClient formrecognizerClient;
- protected final FormRecognizerAsyncClient formrecognizerAsyncClient;
- protected final FormTrainingClient formTrainingClient;
- private final FormTrainingAsyncClient formTrainingAsyncClient;
+ protected final DocumentAnalysisClient documentAnalysisClient;
+ protected final DocumentAnalysisAsyncClient documentAnalysisAsyncClient;
+ protected final DocumentModelAdministrationClient documentModelAdministrationClient;
+ private final DocumentModelAdministrationAsyncClient documentModelAdministrationAsyncClient;
protected String modelId;
@@ -37,7 +37,7 @@ public abstract class ServiceTest extends Pe
* The base class for Azure Formrecognizer tests.
*
* @param options the configurable options for performing perf testing on this class.
- *
+ *
* @throws RuntimeException if "AZURE_FORMRECOGNIZER_API_KEY" or "AZURE_FORMRECOGNIZER_ENDPOINT" is null or empty.
*/
public ServiceTest(TOptions options) {
@@ -53,14 +53,14 @@ public ServiceTest(TOptions options) {
throw new RuntimeException(String.format(CONFIGURATION_ERROR, "AZURE_FORMRECOGNIZER_API_KEY"));
}
- FormTrainingClientBuilder builder = new FormTrainingClientBuilder()
+ DocumentModelAdministrationClientBuilder builder = new DocumentModelAdministrationClientBuilder()
.endpoint(formrecognizerEndpoint)
.credential(new AzureKeyCredential(formrecognizerApiKey));
- this.formTrainingClient = builder.buildClient();
- this.formrecognizerAsyncClient = builder.buildAsyncClient().getFormRecognizerAsyncClient();
- this.formrecognizerClient = formTrainingClient.getFormRecognizerClient();
- this.formTrainingAsyncClient = builder.buildAsyncClient();
+ this.documentModelAdministrationClient = builder.buildClient();
+ this.documentAnalysisAsyncClient = builder.buildAsyncClient().getDocumentAnalysisAsyncClient();
+ this.documentAnalysisClient = documentModelAdministrationClient.getDocumentAnalysisClient();
+ this.documentModelAdministrationAsyncClient = builder.buildAsyncClient();
}
/**
@@ -76,11 +76,11 @@ public Mono globalSetupAsync() {
return Mono.error(new RuntimeException(
String.format(CONFIGURATION_ERROR, "FORMRECOGNIZER_TRAINING_CONTAINER_SAS_URL")));
}
- SyncPoller
- syncPoller = formTrainingAsyncClient
- .beginTraining(trainingDocumentsUrl,
- true,
- new TrainingOptions().setModelName("labeled-perf-model"))
+ SyncPoller
+ syncPoller = documentModelAdministrationAsyncClient
+ .beginBuildModel(trainingDocumentsUrl,
+ null,
+ new BuildModelOptions().setDescription("perf-model"))
.getSyncPoller();
modelId = syncPoller.getFinalResult().getModelId();
return Mono.empty();
@@ -92,6 +92,6 @@ public Mono globalSetupAsync() {
*/
@Override
public Mono globalCleanupAsync() {
- return Mono.defer(() -> formTrainingAsyncClient.deleteModel(modelId));
+ return Mono.defer(() -> documentModelAdministrationAsyncClient.deleteModel(modelId));
}
}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md
index 3ba2034919eae..df8c58278637d 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/CHANGELOG.md
@@ -1,8 +1,19 @@
# Release History
-## 3.2.0-beta.1 (Unreleased)
+## 4.0.0-beta.1 (Unreleased)
### Features Added
+- Added new DocumentAnalysisClient with beginAnalyzeDocument and beginAnalyzeDocumentFromUrl methods.
+Use these methods with the latest Form Recognizer API version to analyze documents, with prebuilt and custom models.
+- Added new models to use with the new DocumentAnalysisClient: AnalyzeResult, AnalyzedDocument, BoundingRegion, DocumentElement,
+DocumentEntity, DocumentField, DocumentKeyValuePair, DocumentKeyValueElement, DocumentLine, DocumentPage, DocumentSelectionMark,
+DocumentSpan, DocumentStyle, DocumentTable, DocumentTableCell, DocumentWord, DocumentOperationResult.
+- Added a new model `DocumentAnalysisServiceVersion` that supports Azure Form Recognizer service version "2021-09-30-preview" and onwards.
+- Added new DocumentModelAdministrationClient with methods: beginBuildModel, beginCreateComposedModel, getCopyAuthorization,
+deleteModel, getAccountProperties, beginCopyModel, listModels, getModel, getOperation, listOperations.
+- Added new models to use with the new DocumentTrainingClient: DocumentModel, DocTypeInfo, DocumentFieldSchema,
+AccountProperties, CopyAuthorization, BuildModelOptions, CopyAuthorizationOptions, CreateComposedModelOptions,
+DocumentModelInfo, ModelOperation, ModelOperationInfo, ModelOperationStatus, ModelOperationKind.
### Breaking Changes
@@ -177,7 +188,7 @@ respectively
## 1.0.0-beta.4 (2020-07-07)
### Breaking Changes
- `beginRecognizeReceipt` APIs now return a `RecognizedForm` model instead of a `RecognizedReceipt`. See
-[this](https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java)
+[this](https://github.com/Azure/azure-sdk-for-java/blob/azure-ai-formrecognizer_1.0.0-beta.4/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java)
suggested approach for extracting information from receipts.
- Methods returning `textContent` have been renamed to `fieldElements` on `FieldData` and `FormTableCell`
- Renamed `FormContent` to `FormElement`
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/README.md b/sdk/formrecognizer/azure-ai-formrecognizer/README.md
index 27664b62988e9..a7e4b4cd8114e 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/README.md
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/README.md
@@ -1,13 +1,11 @@
# Azure Form Recognizer client library for Java
-Azure Cognitive Services Form Recognizer is a cloud service that uses machine learning to recognize text and table data
-from form documents. It includes the following main functionalities:
+Azure Cognitive Services Form Recognizer is a cloud service that uses machine learning to analyze text and structured data from your documents.
+It includes the following main features:
-* Custom models - Recognize field values and table data from forms. These models are trained with your own data, so they're tailored to your forms. You can then take these custom models and recognize forms. You can also manage the custom models you've created and see how close you are to the limit of custom models your account can hold.
-* Content API - Recognize text and table structures, along with their bounding box coordinates, from documents. Corresponds to the REST service's Layout API.
-* Prebuilt receipt model - Recognize data from sales receipts using a prebuilt model.
-* Prebuilt invoice model - Recognize data from USA sales invoices using a prebuilt model.
-* Prebuilt business card model - Recognize data from business cards using a prebuilt model.
-* Prebuilt identity document model - Recognize data from identity documents using a prebuilt model.
+* Layout - Extract text, table structures, and selection marks, along with their bounding region coordinates, from documents.
+* Document - Analyze entities, key-value pairs, tables, and selection marks from documents using the general prebuilt document model.
+* Prebuilt - Analyze data from certain types of common documents (such as receipts, invoices, business cards, or identity documents) using prebuilt models.
+* Custom - Build custom models to extract text, field values, selection marks, and table data from documents. Custom models are built with your own data, so they're tailored to your documents.
[Source code][source_code] | [Package (Maven)][package] | [API reference documentation][api_reference_doc] | [Product Documentation][product_documentation] | [Samples][sample_readme]
@@ -58,18 +56,30 @@ add the direct dependency to your project as follows.
com.azure
azure-ai-formrecognizer
- 3.1.4
+ 4.0.0-beta.1
```
[//]: # ({x-version-update-end})
-> Note: This version of the client library defaults to the `v2.1` version of the service.
+> Note: This version of the client library defaults to the `"2021-09-30-preview"` version of the service.
This table shows the relationship between SDK versions and supported API versions of the service:
|SDK version|Supported API version of service
|-|-
|3.0.x | 2.0
-|3.1.X - Latest GA release| 2.0, 2.1 (default)
+|3.1.X - 3.1.3| 2.0, 2.1 (default)
+|4.0.0-beta.1 - Latest beta release| 2021-09-30-preview (default)
+
+> Note: Starting with version 2021-09-30-preview, a new set of clients were introduced to leverage the newest features
+> of the Form Recognizer service. Please see the Migration Guide for detailed instructions on how to update application
+> code from client library version 3.1.X or lower to the latest version. Additionally, see the [Changelog][changelog] for more detailed information.
+> The below table describes the relationship of each client and its supported API version(s):
+
+|API version|Supported clients
+|-|-
+|2021-09-30-preview | DocumentAnalysisClient and DocumentModelAdministrationClient
+|2.1 | FormRecognizerClient and FormTrainingClient
+|2.0 | FormRecognizerClient and FormTrainingClient
#### Create a Form Recognizer resource
Form Recognizer supports both [multi-service and single-service access][service_access]. Create a Cognitive Service's
@@ -101,8 +111,8 @@ az cognitiveservices account create \
--yes
```
### Authenticate the client
-In order to interact with the Form Recognizer service, you will need to create an instance of the Form Recognizer client.
-Both the asynchronous and synchronous clients can be created by using `FormRecognizerClientBuilder`. Invoking `buildClient()`
+In order to interact with the Form Recognizer service, you will need to create an instance of the Document Analysis client.
+Both the asynchronous and synchronous clients can be created by using `DocumentAnalysisClientBuilder`. Invoking `buildClient()`
will create the synchronous client, while invoking `buildAsyncClient` will create its asynchronous counterpart.
You will need an **endpoint**, and a **key** to instantiate a client object.
@@ -115,7 +125,7 @@ or [Azure CLI][azure_cli_endpoint].
az cognitiveservices account show --name "resource-name" --resource-group "resource-group-name" --query "endpoint"
```
-#### Create a Form Recognizer client using AzureKeyCredential
+#### Create a Document Analysis client using AzureKeyCredential
To use `AzureKeyCredential` authentication, provide the [key][key] as a string to the [AzureKeyCredential][azure_key_credential].
This key can be found in the [Azure Portal][azure_portal] in your created Form Recognizer
resource, or by running the following Azure CLI command to get the key from the Form Recognizer resource:
@@ -124,35 +134,22 @@ resource, or by running the following Azure CLI command to get the key from the
az cognitiveservices account keys list --resource-group --name
```
Use the API key as the credential parameter to authenticate the client:
-
+
```java
-FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()
+DocumentAnalysisClient documentAnalysisClient = new DocumentAnalysisClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("{endpoint}")
.buildClient();
```
-
+
```java
-FormTrainingClient formTrainingClient = new FormTrainingClientBuilder()
+DocumentModelAdministrationClient documentModelAdminClient = new DocumentModelAdministrationClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("{endpoint}")
.buildClient();
```
-The Azure Form Recognizer client library provides a way to **rotate the existing key**.
-
-
-```java
-AzureKeyCredential credential = new AzureKeyCredential("{key}");
-FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()
- .credential(credential)
- .endpoint("{endpoint}")
- .buildClient();
-
-credential.update("{new_key}");
-```
-
-#### Create a Form Recognizer client with Azure Active Directory credential
+#### Create a Document Analysis client with Azure Active Directory credential
Azure SDK for Java supports an Azure Identity package, making it easy to get credentials from Microsoft identity
platform.
@@ -180,55 +177,56 @@ Authorization is easiest using [DefaultAzureCredential][wiki_identity]. It finds
running environment. For more information about using Azure Active Directory authorization with Form Recognizer, please
refer to [the associated documentation][aad_authorization].
-
+
```java
TokenCredential credential = new DefaultAzureCredentialBuilder().build();
-FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()
+DocumentAnalysisClient documentAnalysisClient = new DocumentAnalysisClientBuilder()
.endpoint("{endpoint}")
.credential(credential)
.buildClient();
```
## Key concepts
-### FormRecognizerClient
-The [FormRecognizerClient][form_recognizer_sync_client] and [FormRecognizerAsyncClient][form_recognizer_async_client]
-provide both synchronous and asynchronous operations
- - Recognizing form fields and content using custom models trained to recognize your custom forms.
- These values are returned in a collection of `RecognizedForm` objects. See example [Recognize Custom Forms](#recognize-forms-using-a-custom-model).
- - Recognizing form content, including tables, lines and words, without the need to train a model.
- Form content is returned in a collection of `FormPage` objects. See example [Recognize Content](#recognize-content).
-- Recognizing common fields from the following form types using prebuilt models. These fields and meta-data are returned
- in a collection of `RecognizedForm` objects.
- Supported prebuilt models:
- - Receipts
- - Business cards
- - Invoices
- - Identity Documents
-
- See example [Prebuilt Models](#use-prebuilt-models).
-
-### FormTrainingClient
-The [FormTrainingClient][form_training_sync_client] and
-[FormTrainingAsyncClient][form_training_async_client] provide both synchronous and asynchronous operations
-- Training custom models to recognize all fields and values found in your custom forms. See example [Train a model](#train-a-model).
- A `CustomFormModel` is returned indicating the form types the model will recognize, and the fields it will extract for
- each form type. See the [service's documents][fr_train_without_labels] for a more detailed explanation.
-- Training custom models to recognize specific fields and values you specify by labeling your custom forms.
-A `CustomFormModel` is returned indicating the fields the model will extract, as well as the estimated accuracy for
-each field. See the [service's documents][fr_train_with_labels] for a more detailed explanation.
-- Managing models created in your account. See example [Manage models](#manage-your-models).
+### DocumentAnalysisClient
+The [DocumentAnalysisClient][document_analysis_sync_client] and [DocumentAnalysisAsyncClient][document_analysis_async_client]
+provide both synchronous and asynchronous operations for analyzing input documents using custom and prebuilt models
+through the `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl` methods.
+Use the `modelId` parameter to select the type of model for analysis.
+
+|Model| Features
+|-|-
+|"prebuilt-layout"| Text extraction, selection marks, tables
+|"prebuilt-document"| Text extraction, selection marks, tables, key-value pairs and entities
+|"prebuilt-invoices"| Text extraction, selection marks, tables, and prebuilt fields and values pertaining to English invoices
+|"prebuilt-businessCard"| Text extraction and prebuilt fields and values pertaining to English business cards
+|"prebuilt-idDocument"| Text extraction and prebuilt fields and values pertaining to US driver licenses and international passports
+|"prebuilt-receipt"| Text extraction and prebuilt fields and values pertaining to English sales receipts
+|"{custom-model-id}"| Text extraction, selection marks, tables, labeled fields and values from your custom documents
+
+Sample code snippets to illustrate using a DocumentAnalysisClient [here][sample_readme].
+
+### DocumentModelAdministrationClient
+The [DocumentModelAdministrationClient][document_model_admin_sync_client] and
+[DocumentModelAdministrationAsyncClient][document_model_admin_sync_client] provide both synchronous and asynchronous operations
+- Build custom document analysis models to analyze text content, fields and values found in your custom documents. See example [Build a model](#build-a-model).
+ A `DocumentModel` is returned indicating the document types that the model can analyze, and the fields and schemas it will extract in
+ each doc type.
+- Managing models created in your account by building, listing, deleting, and see how close you are to the limit of
+ custom models your account can hold. See example [Manage models](#manage-your-models).
- Copying a custom model from one Form Recognizer resource to another.
-- Creating a composed model from a collection of existing trained models with labels.
+- Creating a composed model from a collection of existing built models.
+- Listing document model operations associated with the Form Recognizer resource.
Please note that models can also be trained using a graphical user interface such as the [Form Recognizer Labeling Tool][fr_labeling_tool].
+Sample code snippets are provided to illustrate using a DocumentModelAdministrationClient [here](#examples "Examples").
-### Long-Running Operations
+### Long-running operations
Long-running operations are operations which consist of an initial request sent to the service to start an operation,
followed by polling the service at intervals to determine whether the operation has completed or failed, and if it has
succeeded, to get the result.
-Methods that train models or recognize values from forms are modeled as long-running operations. The client exposes
-a `begin` method that returns a `SyncPoller` or `PollerFlux` instance.
+Methods that build models, analyze values from documents or copy and compose models are modeled as long-running operations.
+The client exposes a `begin` method that returns a `SyncPoller` or `PollerFlux` instance.
Callers should wait for the operation to completed by calling `getFinalResult()` on the returned operation from the
`begin` method. Sample code snippets are provided to illustrate using long-running operations
[below](#examples).
@@ -237,136 +235,133 @@ Callers should wait for the operation to completed by calling `getFinalResult()`
The following section provides several code snippets covering some of the most common Form Recognizer tasks, including:
-* [Recognize Forms Using a Custom Model](#recognize-forms-using-a-custom-model "Recognize Forms Using a Custom Model")
-* [Recognize Content](#recognize-content "Recognize Content")
+* [Extract Layout](#extract-layout "Extract Layout")
* [Use Prebuilt Models](#use-prebuilt-models)
-* [Train a Model](#train-a-model "Train a model")
+* [Build a Model](#build-a-model "Build a model")
+* [Analyze Documents using a Custom Model](#analyze-documents-using-a-custom-model "Analyze Documents using a Custom Model")
* [Manage Your Models](#manage-your-models "Manage Your Models")
-### Recognize Forms Using a Custom Model
-Recognize the name/value pairs and table data from forms. These models are trained with your own data,
-so they're tailored to your forms. You should only recognize forms of the same form type that the custom model was trained on.
-
+### Extract Layout
+Extract text, table structures and selection marks like radio buttons and check boxes, along with their bounding box
+coordinates, from documents, without the need to build a model.
+
```java
-String formUrl = "{form_url}";
-String modelId = "{custom_trained_model_id}";
-SyncPoller> recognizeFormPoller =
- formRecognizerClient.beginRecognizeCustomFormsFromUrl(modelId, formUrl);
-
-List recognizedForms = recognizeFormPoller.getFinalResult();
-
-for (int i = 0; i < recognizedForms.size(); i++) {
- RecognizedForm form = recognizedForms.get(i);
- System.out.printf("----------- Recognized custom form info for page %d -----------%n", i);
- System.out.printf("Form type: %s%n", form.getFormType());
- System.out.printf("Form type confidence: %.2f%n", form.getFormTypeConfidence());
- form.getFields().forEach((label, formField) ->
- System.out.printf("Field %s has value %s with confidence score of %f.%n", label,
- formField.getValueData().getText(),
- formField.getConfidence())
- );
-}
-```
+// analyze document layout using file input stream
+File layoutDocument = new File("local/file_path/filename.png");
+byte[] fileContent = Files.readAllBytes(layoutDocument.toPath());
+InputStream fileStream = new ByteArrayInputStream(fileContent);
+
+SyncPoller analyzeLayoutResultPoller =
+ documentAnalysisClient.beginAnalyzeDocument("prebuilt-layout", fileStream, layoutDocument.length());
+
+AnalyzeResult analyzeLayoutResult = analyzeLayoutResultPoller.getFinalResult();
+
+// pages
+analyzeLayoutResult.getPages().forEach(documentPage -> {
+ System.out.printf("Page has width: %.2f and height: %.2f, measured with unit: %s%n",
+ documentPage.getWidth(),
+ documentPage.getHeight(),
+ documentPage.getUnit());
+
+ // lines
+ documentPage.getLines().forEach(documentLine ->
+ System.out.printf("Line %s is within a bounding box %s.%n",
+ documentLine.getContent(),
+ documentLine.getBoundingBox().toString()));
+
+ // selection marks
+ documentPage.getSelectionMarks().forEach(documentSelectionMark ->
+ System.out.printf("Selection mark is %s and is within a bounding box %s with confidence %.2f.%n",
+ documentSelectionMark.getState().toString(),
+ documentSelectionMark.getBoundingBox().toString(),
+ documentSelectionMark.getConfidence()));
+});
-### Recognize Content
-Recognize text, table structures and selection marks like radio buttons and check boxes, along with their bounding box
-coordinates, from documents, without the need to train a model.
-
-```java
-// recognize form content using file input stream
-File form = new File("local/file_path/filename.png");
-byte[] fileContent = Files.readAllBytes(form.toPath());
-InputStream inputStream = new ByteArrayInputStream(fileContent);
-
-SyncPoller> recognizeContentPoller =
- formRecognizerClient.beginRecognizeContent(inputStream, form.length());
-
-List contentPageResults = recognizeContentPoller.getFinalResult();
-
-for (int i = 0; i < contentPageResults.size(); i++) {
- FormPage formPage = contentPageResults.get(i);
- System.out.printf("----Recognizing content info for page %d ----%n", i);
- // Table information
- System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(),
- formPage.getHeight(),
- formPage.getUnit());
- formPage.getTables().forEach(formTable -> {
- System.out.printf("Table has %d rows and %d columns.%n", formTable.getRowCount(),
- formTable.getColumnCount());
- formTable.getCells().forEach(formTableCell ->
- System.out.printf("Cell has text %s.%n", formTableCell.getText()));
+// tables
+List tables = analyzeLayoutResult.getTables();
+for (int i = 0; i < tables.size(); i++) {
+ DocumentTable documentTable = tables.get(i);
+ System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
+ documentTable.getColumnCount());
+ documentTable.getCells().forEach(documentTableCell -> {
+ System.out.printf("Cell '%s', has row index %d and column index %d.%n", documentTableCell.getContent(),
+ documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
});
- // Selection Mark
- formPage.getSelectionMarks().forEach(selectionMark -> System.out.printf(
- "Page: %s, Selection mark is %s within bounding box %s has a confidence score %.2f.%n",
- selectionMark.getPageNumber(), selectionMark.getState(), selectionMark.getBoundingBox().toString(),
- selectionMark.getConfidence()));
+ System.out.println();
}
```
### Use Prebuilt Models
-Extract fields from certain types of common forms using prebuilt models provided by the Form Recognizer service. Supported prebuilt models are:
-- Business cards. See fields found on a business card [here][service_recognize_business_cards_fields].
-- Invoices. See fields found on an invoice [here][service_recognize_invoices_fields].
-- Identity documents. See fields found on an identity document [here][service_recognize_identity_documents_fields].
-- Sales receipts. See fields found on a receipt [here][service_recognize_receipt_fields].
-
-For example, to extract fields from a sales receipt, use the prebuilt Receipt model provided by the `beginRecognizeReceiptsFromUrl` method:
-See [StronglyTypedRecognizedForm][strongly_typed_sample] for a suggested approach to extract information from receipts.
-
-
+Extract fields from select document types such as receipts, invoices, business cards, and identity documents using prebuilt models provided by the Form Recognizer service.
+Supported prebuilt models are:
+- Analyze receipts using the `prebuilt-receipt` model (fields recognized by the service can be found [here][service_analyze_receipt_fields])
+- Analyze business cards using the `prebuilt-businessCard` model (fields recognized by the service can be found [here][service_analyze_business_cards_fields]).
+- Analyze invoices using the `prebuilt-invoice` model (fields recognized by the service can be found [here][service_analyze_invoices_fields]).
+- Analyze identity documents using the `prebuilt-idDocuments` model (fields recognized by the service can be found [here][service_analyze_identity_documents_fields]).
+
+For example, to analyze fields from a sales receipt, into the `beginAnalyzeDocument` method:
+
```java
String receiptUrl = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/formrecognizer"
- + "/azure-ai-formrecognizer/src/samples/resources/sample-forms/receipts/contoso-allinone.jpg";
-SyncPoller> syncPoller =
- formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl);
-List receiptPageResults = syncPoller.getFinalResult();
-
-for (int i = 0; i < receiptPageResults.size(); i++) {
- RecognizedForm recognizedForm = receiptPageResults.get(i);
- Map recognizedFields = recognizedForm.getFields();
- System.out.printf("----------- Recognizing receipt info for page %d -----------%n", i);
- FormField merchantNameField = recognizedFields.get("MerchantName");
+ + "/azure-ai-formrecognizer/src/samples/resources/sample-documents/receipts/contoso-allinone.jpg";
+
+SyncPoller analyzeReceiptPoller =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl("prebuilt-receipt", receiptUrl);
+
+AnalyzeResult receiptResults = analyzeReceiptPoller.getFinalResult();
+
+for (int i = 0; i < receiptResults.getDocuments().size(); i++) {
+ AnalyzedDocument analyzedReceipt = receiptResults.getDocuments().get(i);
+ Map receiptFields = analyzedReceipt.getFields();
+ System.out.printf("----------- Analyzing receipt info %d -----------%n", i);
+ DocumentField merchantNameField = receiptFields.get("MerchantName");
if (merchantNameField != null) {
- if (FieldValueType.STRING == merchantNameField.getValue().getValueType()) {
- String merchantName = merchantNameField.getValue().asString();
+ if (DocumentFieldType.STRING == merchantNameField.getType()) {
+ String merchantName = merchantNameField.getValueString();
System.out.printf("Merchant Name: %s, confidence: %.2f%n",
merchantName, merchantNameField.getConfidence());
}
}
- FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber");
+ DocumentField merchantPhoneNumberField = receiptFields.get("MerchantPhoneNumber");
if (merchantPhoneNumberField != null) {
- if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValue().getValueType()) {
- String merchantAddress = merchantPhoneNumberField.getValue().asPhoneNumber();
+ if (DocumentFieldType.PHONE_NUMBER == merchantPhoneNumberField.getType()) {
+ String merchantAddress = merchantPhoneNumberField.getValuePhoneNumber();
System.out.printf("Merchant Phone number: %s, confidence: %.2f%n",
merchantAddress, merchantPhoneNumberField.getConfidence());
}
}
- FormField transactionDateField = recognizedFields.get("TransactionDate");
+ DocumentField transactionDateField = receiptFields.get("TransactionDate");
if (transactionDateField != null) {
- if (FieldValueType.DATE == transactionDateField.getValue().getValueType()) {
- LocalDate transactionDate = transactionDateField.getValue().asDate();
+ if (DocumentFieldType.DATE == transactionDateField.getType()) {
+ LocalDate transactionDate = transactionDateField.getValueDate();
System.out.printf("Transaction Date: %s, confidence: %.2f%n",
transactionDate, transactionDateField.getConfidence());
}
}
- FormField receiptItemsField = recognizedFields.get("Items");
+ DocumentField receiptItemsField = receiptFields.get("Items");
if (receiptItemsField != null) {
System.out.printf("Receipt Items: %n");
- if (FieldValueType.LIST == receiptItemsField.getValue().getValueType()) {
- List receiptItems = receiptItemsField.getValue().asList();
+ if (DocumentFieldType.LIST == receiptItemsField.getType()) {
+ List receiptItems = receiptItemsField.getValueList();
receiptItems.stream()
- .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValue().getValueType())
- .map(formField -> formField.getValue().asMap())
- .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> {
+ .filter(receiptItem -> DocumentFieldType.MAP == receiptItem.getType())
+ .map(documentField -> documentField.getValueMap())
+ .forEach(documentFieldMap -> documentFieldMap.forEach((key, documentField) -> {
+ if ("Name".equals(key)) {
+ if (DocumentFieldType.STRING == documentField.getType()) {
+ String name = documentField.getValueString();
+ System.out.printf("Name: %s, confidence: %.2fs%n",
+ name, documentField.getConfidence());
+ }
+ }
if ("Quantity".equals(key)) {
- if (FieldValueType.FLOAT == formField.getValue().getValueType()) {
- Float quantity = formField.getValue().asFloat();
+ if (DocumentFieldType.FLOAT == documentField.getType()) {
+ Float quantity = documentField.getValueFloat();
System.out.printf("Quantity: %f, confidence: %.2f%n",
- quantity, formField.getConfidence());
+ quantity, documentField.getConfidence());
}
}
}));
@@ -376,81 +371,142 @@ for (int i = 0; i < receiptPageResults.size(); i++) {
```
For more information and samples using prebuilt models see:
-- [Business Cards sample][recognize_business_cards_from_url]
-- [Identity Documents][recognize_identity_documents_from_url]
-- [Invoices][recognize_invoices_from_url]
-- [Receipts sample][recognize_receipts_from_url]
+- [Business Cards][analyze_business_cards_from_url]
+- [Identity Documents][analyze_identity_documents_from_url]
+- [Invoices][analyze_invoices_from_url]
+- [Receipts sample][analyze_receipts_from_url]
-### Train a model
-Train a machine-learned model on your own form type. The resulting model will be able to recognize values from the types of forms it was trained on.
+### Build a model
+Build a machine-learned model on your own document type. The resulting model will be able to analyze values from the types of documents it was built on.
Provide a container SAS url to your Azure Storage Blob container where you're storing the training documents. See details on setting this up
in the [service quickstart documentation][quickstart_training].
-
+
+More details on setting up a container and required file structure can be found in the [service documentation][fr_build_training_set].
+
+
```java
+// Build custom document analysis model
String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}";
-SyncPoller trainingPoller =
- formTrainingClient.beginTraining(trainingFilesUrl,
- false,
- new TrainingOptions()
- .setModelName("my model trained without labels"),
+// The shared access signature (SAS) Url of your Azure Blob Storage container with your forms.
+SyncPoller buildOperationPoller =
+ documentModelAdminClient.beginBuildModel(trainingFilesUrl,
+ "my-build-model",
+ new BuildModelOptions().setDescription("model desc"),
Context.NONE);
-CustomFormModel customFormModel = trainingPoller.getFinalResult();
+DocumentModel documentModel = buildOperationPoller.getFinalResult();
// Model Info
-System.out.printf("Model Id: %s%n", customFormModel.getModelId());
-System.out.printf("Model name given by user: %s%n", customFormModel.getModelName());
-System.out.printf("Model Status: %s%n", customFormModel.getModelStatus());
-System.out.printf("Training started on: %s%n", customFormModel.getTrainingStartedOn());
-System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn());
-
-System.out.println("Recognized Fields:");
-// looping through the subModels, which contains the fields they were trained on
-// Since the given training documents are unlabeled, we still group them but they do not have a label.
-customFormModel.getSubmodels().forEach(customFormSubmodel -> {
- System.out.printf("Submodel Id: %s%n: ", customFormSubmodel.getModelId());
- // Since the training data is unlabeled, we are unable to return the accuracy of this model
- customFormSubmodel.getFields().forEach((field, customFormModelField) ->
- System.out.printf("Field: %s Field Label: %s%n",
- field, customFormModelField.getLabel()));
+System.out.printf("Model ID: %s%n", documentModel.getModelId());
+System.out.printf("Model Description: %s%n", documentModel.getDescription());
+System.out.printf("Model created on: %s%n%n", documentModel.getCreatedOn());
+documentModel.getDocTypes().forEach((key, docTypeInfo) -> {
+ System.out.printf("Document type: %s%n", key);
+ docTypeInfo.getFieldSchema().forEach((name, documentFieldSchema) -> {
+ System.out.printf("Document field: %s%n", name);
+ System.out.printf("Document field type: %s%n", documentFieldSchema.getType().toString());
+ System.out.printf("Document field confidence: %.2f%n", docTypeInfo.getFieldConfidence().get(name));
+ });
+});
+```
+
+### Analyze Documents using a Custom Model
+Analyze the key/value pairs and table data from documents. These models are built with your own data,
+so they're tailored to your documents. You should only analyze documents of the same doc type that the custom model
+was built on.
+
+```java
+String documentUrl = "{document-url}";
+String modelId = "{custom-built-model-ID}";
+SyncPoller analyzeDocumentPoller =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl(modelId, documentUrl);
+
+AnalyzeResult analyzeResult = analyzeDocumentPoller.getFinalResult();
+
+for (int i = 0; i < analyzeResult.getDocuments().size(); i++) {
+ final AnalyzedDocument analyzedDocument = analyzeResult.getDocuments().get(i);
+ System.out.printf("----------- Analyzing custom document %d -----------%n", i);
+ System.out.printf("Analyzed document has doc type %s with confidence : %.2f%n",
+ analyzedDocument.getDocType(), analyzedDocument.getConfidence());
+ analyzedDocument.getFields().forEach((key, documentField) -> {
+ System.out.printf("Document Field content: %s%n", documentField.getContent());
+ System.out.printf("Document Field confidence: %.2f%n", documentField.getConfidence());
+ System.out.printf("Document Field Type: %.2f%n", documentField.getType().toString());
+ System.out.printf("Document Field found within bounding region: %s%n",
+ documentField.getBoundingRegions().toString());
+ });
+}
+
+analyzeResult.getPages().forEach(documentPage -> {
+ System.out.printf("Page has width: %.2f and height: %.2f, measured with unit: %s%n",
+ documentPage.getWidth(),
+ documentPage.getHeight(),
+ documentPage.getUnit());
+
+ // lines
+ documentPage.getLines().forEach(documentLine ->
+ System.out.printf("Line %s is within a bounding box %s.%n",
+ documentLine.getContent(),
+ documentLine.getBoundingBox().toString()));
+
+ // words
+ documentPage.getWords().forEach(documentWord ->
+ System.out.printf("Word %s has a confidence score of %.2f%n.",
+ documentWord.getContent(),
+ documentWord.getConfidence()));
});
+
+// tables
+List tables = analyzeResult.getTables();
+for (int i = 0; i < tables.size(); i++) {
+ DocumentTable documentTable = tables.get(i);
+ System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
+ documentTable.getColumnCount());
+ documentTable.getCells().forEach(documentTableCell -> {
+ System.out.printf("Cell '%s', has row index %d and column index %d.%n",
+ documentTableCell.getContent(),
+ documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
+ });
+ System.out.println();
+}
```
### Manage your models
-Manage the custom models in your Form Recognizer account.
-
+Manage the models in your Form Recognizer account.
+
```java
-// First, we see how many custom models we have, and what our limit is
-AccountProperties accountProperties = formTrainingClient.getAccountProperties();
-System.out.printf("The account has %d custom models, and we can have at most %d custom models",
- accountProperties.getCustomModelCount(), accountProperties.getCustomModelLimit());
+AtomicReference modelId = new AtomicReference<>();
+
+// First, we see how many models we have, and what our limit is
+AccountProperties accountProperties = documentModelAdminClient.getAccountProperties();
+System.out.printf("The account has %s models, and we can have at most %s models",
+ accountProperties.getDocumentModelCount(), accountProperties.getDocumentModelLimit());
-// Next, we get a paged list of all of our custom models
-PagedIterable customModels = formTrainingClient.listCustomModels();
+// Next, we get a paged list of all of our models
+PagedIterable customDocumentModels = documentModelAdminClient.listModels();
System.out.println("We have following models in the account:");
-customModels.forEach(customFormModelInfo -> {
- System.out.printf("Model Id: %s%n", customFormModelInfo.getModelId());
- // get specific custom model info
- CustomFormModel customModel = formTrainingClient.getCustomModel(customFormModelInfo.getModelId());
- System.out.printf("Model Status: %s%n", customModel.getModelStatus());
- System.out.printf("Training started on: %s%n", customModel.getTrainingStartedOn());
- System.out.printf("Training completed on: %s%n", customModel.getTrainingCompletedOn());
- customModel.getSubmodels().forEach(customFormSubmodel -> {
- System.out.printf("Custom Model Form type: %s%n", customFormSubmodel.getFormType());
- System.out.printf("Custom Model Accuracy: %f%n", customFormSubmodel.getAccuracy());
- if (customFormSubmodel.getFields() != null) {
- customFormSubmodel.getFields().forEach((fieldText, customFormModelField) -> {
- System.out.printf("Field Text: %s%n", fieldText);
- System.out.printf("Field Accuracy: %f%n", customFormModelField.getAccuracy());
- });
- }
+customDocumentModels.forEach(documentModelInfo -> {
+ System.out.printf("Model ID: %s%n", documentModelInfo.getModelId());
+ modelId.set(documentModelInfo.getModelId());
+
+ // get custom document analysis model info
+ DocumentModel documentModel = documentModelAdminClient.getModel(documentModelInfo.getModelId());
+ System.out.printf("Model ID: %s%n", documentModel.getModelId());
+ System.out.printf("Model Description: %s%n", documentModel.getDescription());
+ System.out.printf("Model created on: %s%n", documentModel.getCreatedOn());
+ documentModel.getDocTypes().forEach((key, docTypeInfo) -> {
+ docTypeInfo.getFieldSchema().forEach((field, documentFieldSchema) -> {
+ System.out.printf("Field: %s", field);
+ System.out.printf("Field type: %s", documentFieldSchema.getType());
+ System.out.printf("Field confidence: %.2f", docTypeInfo.getFieldConfidence().get(field));
+ });
});
});
-// Delete Custom Model
-formTrainingClient.deleteModel("{modelId}");
+// Delete Model
+documentModelAdminClient.deleteModel(modelId.get());
```
-For more detailed examples, refer to [samples][sample_readme].
+For more detailed examples, refer to [samples][sample_examples].
## Troubleshooting
### General
@@ -459,10 +515,10 @@ to provide an invalid file source URL an `HttpResponseException` would be raised
In the following code snippet, the error is handled
gracefully by catching the exception and display the additional information about the error.
-
+
```java
try {
- formRecognizerClient.beginRecognizeContentFromUrl("invalidSourceUrl");
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl("prebuilt-receipt", "invalidSourceUrl");
} catch (HttpResponseException e) {
System.out.println(e.getMessage());
}
@@ -482,45 +538,46 @@ the client library to use the Netty HTTP client. Configuring or changing the HTT
The following section provides several code snippets illustrating common patterns used in the Form Recognizer API.
These code samples show common scenario operations with the Azure Form Recognizer client library.
-* Recognize business card from a URL: [RecognizeBusinessCardFromUrl][recognize_business_cards_from_url]
-* Recognize identity documents from a URL: [RecognizeIdentityDocumentsFromUrl][recognize_identity_documents_from_url]
-* Recognize invoice from a URL: [RecognizeInvoiceFromUrl][recognize_invoices_from_url]
-* Recognize receipts: [RecognizeReceipts][recognize_receipts]
-* Recognize receipts from a URL: [RecognizeReceiptsFromUrl][recognize_receipts_from_url]
-* Recognize content: [RecognizeContent][recognize_content]
-* Recognize custom forms from a URL: [RecognizeCustomFormsFromUrl][recognize_custom_forms]
-* Train a model without labels: [TrainModelWithoutLabels][train_unlabeled_model]
-* Train a model with labels: [TrainModelWithLabels][train_labeled_model]
+* Analyze business card from a URL: [AnalyzeBusinessCardFromUrl][analyze_business_cards_from_url]
+* Analyze identity documents from a URL: [AnalyzeIdentityDocumentsFromUrl][analyze_identity_documents_from_url]
+* Analyze invoice from a URL: [AnalyzeInvoiceFromUrl][analyze_invoices_from_url]
+* Analyze receipts: [AnalyzeReceipts][analyze_receipts]
+* Analyze receipts from a URL: [AnalyzeReceiptsFromUrl][analyze_receipts_from_url]
+* Extract layout: [AnalyzeLayout][analyze_layout]
+* Analyze custom documents from a URL: [AnalyzeCustomDocumentFromUrl][analyze_custom_documents]
+* Build a model: [BuildModel][build_model]
* Manage custom models: [ManageCustomModels][manage_custom_models]
* Copy a model between Form Recognizer resources: [CopyModel][copy_model]
+* Create a composed model from a collection of custom-built models: [CreateComposedModel][create_composed_model]
+* Get/List document model operations associated with the Form Recognizer resource: [GetOperation][get_operation]
#### Async APIs
All the examples shown so far have been using synchronous APIs, but we provide full support for async APIs as well.
-You'll need to use `FormRecognizerAsyncClient`
-
+You'll need to use `DocumentAnalysisAsyncClient`
+
```java
-FormRecognizerAsyncClient formRecognizerAsyncClient = new FormRecognizerClientBuilder()
+DocumentAnalysisAsyncClient documentAnalysisAsyncClient = new DocumentAnalysisClientBuilder()
.credential(new AzureKeyCredential("{key}"))
.endpoint("{endpoint}")
.buildAsyncClient();
```
-* Recognize business card from a URL: [RecognizeBusinessCardFromUrlAsync][recognize_business_cards_from_url_async]
-* Recognize identity documents from a URL: [RecognizeIdentityDocumentsFromUrlAsync][recognize_identity_documents_from_url_async]
-* Recognize invoice: [RecognizeInvoiceAsync][recognize_invoices_async]
-* Recognize receipts: [RecognizeReceiptsAsync][recognize_receipts_async]
-* Recognize receipts from a URL: [RecognizeReceiptsFromUrlAsync][recognize_receipts_from_url_async]
-* Recognize content from a URL: [RecognizeContentFromUrlAsync][recognize_content_from_url_async]
-* Recognize custom forms: [RecognizeCustomFormsAsync][recognize_custom_forms_async]
-* Train a model without labels: [TrainModelWithoutLabelsAsync][train_unlabeled_model_async]
-* Train a model with labels: [TrainModelWithLabelsAsync][train_labeled_model_async]
+* Analyze business card from a URL: [AnalyzeBusinessCardFromUrlAsync][analyze_business_cards_from_url_async]
+* Analyze identity documents from a URL: [AnalyzeIdentityDocumentsFromUrlAsync][analyze_identity_documents_from_url_async]
+* Analyze invoice: [AnalyzeInvoiceAsync][analyze_invoices_async]
+* Analyze receipts: [AnalyzeReceiptsAsync][analyze_receipts_async]
+* Analyze receipts from a URL: [AnalyzeReceiptsFromUrlAsync][analyze_receipts_from_url_async]
+* Extract layout from a URL: [AnalyzeLayoutFromUrlAsync][analyze_layout_from_url_async]
+* Analyze custom documents: [AnalyzeCustomDocumentAsync][analyze_custom_documents_async]
+* Build a model: [BuildModelAsync][build_model_async]
* Manage custom models: [ManageCustomModelsAsync][manage_custom_models_async]
* Copy a model between Form Recognizer resources: [CopyModelAsync][copy_model_async]
-* Create a composed model from a collection of models trained with labels: [CreateComposedModelAsync][create_composed_model_async]
+* Create a composed model from a collection of custom-built models: [CreateComposedModelAsync][create_composed_model_async]
+* Get/List document model operations associated with the Form Recognizer resource: [GetOperationAsync][get_operation_async]
### Additional documentation
-
-For more extensive documentation on Azure Cognitive Services Form Recognizer, see the [Form Recognizer documentation][github_io_docs].
+See the [Sample README][sample_readme] for several code snippets illustrating common patterns used in the Form Recognizer Java SDK.
+For more extensive documentation on Azure Cognitive Services Form Recognizer, see the [Form Recognizer documentation][api_reference_doc].
## Contributing
@@ -535,7 +592,6 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[azure_key_credential]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/credential/AzureKeyCredential.java
[key]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows#get-the-keys-for-your-resource
[api_reference_doc]: https://aka.ms/azsdk-java-formrecognizer-ref-docs
-[github_io_docs]: https://aka.ms/azsdk-java-formrecognizer-ref-docs
[azure_identity_credential_type]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/identity/azure-identity#credentials
[azure_cli]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account-cli?tabs=windows
[azure_cli_endpoint]: https://docs.microsoft.com/cli/azure/cognitiveservices/account?view=azure-cli-latest#az-cognitiveservices-account-show
@@ -547,53 +603,55 @@ This project has adopted the [Microsoft Open Source Code of Conduct][coc]. For m
[coc_faq]: https://opensource.microsoft.com/codeofconduct/faq/
[coc_contact]: mailto:opencode@microsoft.com
[create_new_resource]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows#create-a-new-azure-cognitive-services-resource
-[create_composed_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CreateComposedModelAsync.java
-[differentiate_custom_forms_with_labeled_and_unlabeled_models]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AdvancedDiffLabeledUnlabeledData.java
[form_recognizer_account]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows
-[form_recognizer_async_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java
-[form_recognizer_sync_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClient.java
-[form_training_async_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingAsyncClient.java
-[form_training_sync_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/training/FormTrainingClient.java
[grant_access]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal
[http_clients_wiki]: https://github.com/Azure/azure-sdk-for-java/wiki/HTTP-clients
-[fr_labeling_tool]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/label-tool?tabs=v2-1
-[fr_train_without_labels]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview#train-without-labels
-[fr_train_with_labels]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview#train-with-labels
[http_response_exception]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/core/azure-core/src/main/java/com/azure/core/exception/HttpResponseException.java
[jdk_link]: https://docs.microsoft.com/java/azure/jdk/?view=azure-java-stable
[logging]: https://github.com/Azure/azure-sdk-for-java/wiki/Logging-with-Azure-SDK
[package]: https://mvnrepository.com/artifact/com.azure/azure-ai-formrecognizer
[product_documentation]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/overview
-[sample_readme]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/
-[manage_custom_models]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModels.java
-[manage_custom_models_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/ManageCustomModelsAsync.java
-[recognize_business_cards_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeBusinessCardFromUrl.java
-[recognize_business_cards_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeBusinessCardFromUrlAsync.java
-[recognize_identity_documents_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeIdentityDocumentsFromUrl.java
-[recognize_identity_documents_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeIdentityDocumentsFromUrlAsync.java
-[recognize_invoices_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeInvoicesAsync.java
-[recognize_invoices_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeInvoicesFromUrl.java
-[recognize_content]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContent.java
-[recognize_content_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeContentFromUrlAsync.java
-[recognize_receipts]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceipts.java
-[recognize_receipts_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsAsync.java
-[recognize_receipts_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrl.java
-[recognize_receipts_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeReceiptsFromUrlAsync.java
-[recognize_custom_forms]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsFromUrl.java
-[recognize_custom_forms_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/RecognizeCustomFormsAsync.java
[register_AAD_application]: https://docs.microsoft.com/azure/cognitive-services/authentication#assign-a-role-to-a-service-principal
-[train_unlabeled_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabels.java
-[train_unlabeled_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithoutLabelsAsync.java
-[train_labeled_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabels.java
-[train_labeled_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/TrainModelWithLabelsAsync.java
-[copy_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModel.java
-[copy_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/CopyModelAsync.java
+[fr_labeling_tool]: https://aka.ms/azsdk/formrecognizer/labelingtool
+[fr_build_training_set]: https://aka.ms/azsdk/formrecognizer/buildtrainingset
+[sample_examples]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples#examples
+[sample_readme]: https://github.com/Azure/azure-sdk-for-java/tree/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples#readme
+
+[create_composed_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CreateComposedModel.java
+[create_composed_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CreateComposedModelAsync.java
+[sample_readme]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/
+[document_analysis_async_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java
+[document_analysis_sync_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java
+[document_model_admin_async_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationAsyncClient.java
+[document_model_admin_sync_client]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClient.java
+[manage_custom_models]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/ManageCustomModels.java
+[manage_custom_models_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/ManageCustomModelsAsync.java
+[analyze_business_cards_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeBusinessCardFromUrl.java
+[analyze_business_cards_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeBusinessCardFromUrlAsync.java
+[analyze_identity_documents_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeIdentityDocumentsFromUrl.java
+[analyze_identity_documents_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeIdentityDocumentsFromUrlAsync.java
+[analyze_invoices_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeInvoicesAsync.java
+[analyze_invoices_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeInvoicesFromUrl.java
+[analyze_layout]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayout.java
+[analyze_layout_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeLayoutFromUrlAsync.java
+[analyze_receipts]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeReceipts.java
+[analyze_receipts_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeReceiptsAsync.java
+[analyze_receipts_from_url]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeReceiptsFromUrl.java
+[analyze_receipts_from_url_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeReceiptsFromUrlAsync.java
+[analyze_custom_documents]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeCustomDocumentFromUrl.java
+[analyze_custom_documents_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/AnalyzeCustomDocumentAsync.java
+[build_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/BuildModel.java
+[build_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/BuildModelAsync.java
+[copy_model]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CopyModel.java
+[copy_model_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/CopyModelAsync.java
+[get_operation]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/GetOperationInfo.java
+[get_operation_async]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/administration/GetOperationInfoAsync.java
+
[service_access]: https://docs.microsoft.com/azure/cognitive-services/cognitive-services-apis-create-account?tabs=multiservice%2Cwindows
-[service_recognize_business_cards_fields]: https://aka.ms/formrecognizer/businesscardfields
-[service_recognize_invoices_fields]: https://aka.ms/formrecognizer/invoicefields
-[service_recognize_identity_documents_fields]: https://aka.ms/formrecognizer/iddocumentfields
-[service_recognize_receipt_fields]: https://aka.ms/formrecognizer/receiptfields
-[strongly_typed_sample]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/java/com/azure/ai/formrecognizer/StronglyTypedRecognizedForm.java
+[service_analyze_business_cards_fields]: https://aka.ms/azsdk/formrecognizer/businesscardfieldschema
+[service_analyze_invoices_fields]: https://aka.ms/azsdk/formrecognizer/invoicefieldschema
+[service_analyze_identity_documents_fields]: https://aka.ms/azsdk/formrecognizer/iddocumentfieldschema
+[service_analyze_receipt_fields]: https://aka.ms/azsdk/formrecognizer/receiptfieldschema
[source_code]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src
[quickstart_training]: https://docs.microsoft.com/azure/cognitive-services/form-recognizer/quickstarts/curl-train-extract#train-a-form-recognizer-model
[wiki_identity]: https://github.com/Azure/azure-sdk-for-java/wiki/Identity-and-Authentication
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/migration-guide.md b/sdk/formrecognizer/azure-ai-formrecognizer/migration-guide.md
new file mode 100644
index 0000000000000..e5cd72672ec15
--- /dev/null
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/migration-guide.md
@@ -0,0 +1,591 @@
+# Guide for migrating to `azure-ai-formrecognizer (4.0.0-beta.1 - above)` from `azure-ai-formrecognizer (3.1.x - below)`
+
+This guide is intended to assist in the migration to `azure-ai-formrecognizer (4.0.0-beta.1 - above)` from `azure-ai-formrecognizer (3.1.x - below)`. It will focus on side-by-side comparisons for similar operations between the two package versions.
+
+We assume that you are familiar with the previous SDK `azure-ai-formrecognizer (3.1.x - below)`. If you are new to this library, please refer to the SDK README for [azure-ai-formrecognizer][README] directly rather than this migration guide.
+
+## Table of contents
+- [Migration benefits](#migration-benefits)
+- [Important changes](#important-changes)
+ - [Instantiating clients](#instantiating-clients)
+ - [Analyze documents](#analyze-documents)
+ - [Using a prebuilt Model](#using-a-prebuilt-model)
+ - [Using a layout model](#using-a-layout-model)
+ - [Using custom model](#using-a-custom-model)
+ - [Manage models](#manage-models)
+- [Additional samples](#additional-samples)
+
+## Migration benefits
+
+A natural question to ask when considering whether to adopt a new version of the library is what the benefits of
+doing so would be. As Azure Form Recognizer has matured and been embraced by a more diverse group of developers,
+we have been focused on learning the patterns and practices to best support developer productivity and add value to our
+customers.
+
+To improve the development experience and address the consistent feedback across the Form Recognizer SDK, this new
+version of the library replaces the previously existing clients `FormRecognizerClient` and `FormTrainingClient` with
+`DocumentAnalysisClient` and the `DocumentModelAdministrationClient` that provide unified methods for
+analyzing documents and provide support for the new features added by the service in
+API version `2021-09-30-preview` and later.
+
+The below table describes the relationship of each client and its supported API version(s):
+
+|API version|Supported clients
+|-|-
+|2021-09-30-preview | DocumentAnalysisClient and DocumentModelAdministrationClient
+|2.1 | FormRecognizerClient and FormTrainingClient
+|2.0 | FormRecognizerClient and FormTrainingClient
+
+The newer Form Recognizer client library also provides the ability to share in some improvements made to the Azure development experience, such as:
+
+- A unified method, `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`, for analyzing text and structured data from documents.
+This method uses a `modelId` parameter for specifying the type of analysis to perform.
+The newly introduced method return type `AnalyzeResult` removes hierarchical dependencies between the previously known `FormElements`
+and move them to a more top level and easily accessible position such as `AnalyzeResult.tables` instead of `RecognizedForm.pages.tables`.
+The service has further matured to define cross-page elements by using the `BoundingRegion` model and by specifying the content and span information on document fields.
+- A unified return type `DocumentModel` indicating the document types the model can analyze and the specific fields it can analyze along with the estimated confidence for each field.
+- Specifying a modelId instead of the generated GUID when creating models, copying or composing models along with an optional description. See [here][service_supported_models], for the supported model types.
+- Modified `Generate Copy Authorization operation` response to return the target resource information so that it could be used directly when copying custom models method instead of needed to be provided by the user.
+- List Models operation now returns a paged list of prebuilt in addition to custom models that are built successfully.
+Also, when using the `getModel()` model, users can get the field schema (field names and types that the model can extract) for the model they specified, including for prebuilt models.
+- Added methods for getting/listing operations of the past 24 hours, useful to track the status of model creation/copying operations and any resulting errors.
+
+Please refer to the [README][README] for more information on these new clients.
+
+## Important changes
+
+#### Instantiating clients
+
+In 3.x.x, the `FormRecognizerClient` and the `FormRecognizerAsyncClient` is instantiated via the `FormRecognizerClientBuilder`.
+
+In 4.x.x, the `FormRecognizerClient` and the `FormRecognizerAsyncClient`, has been replaced by the `DocumentAnalysisClient` and the `DocumentAnalysisAsyncClient` respectively and is instantiated via the [DocumentAnalysisClientBuilder][DocumentAnalysisClientBuilder].
+The sync and async operations are separated to [DocumentAnalysisClient][DocumentAnalysisClient] and [DocumentAnalysisAsyncClient][DocumentAnalysisAsyncClient].
+
+Instantiating FormRecognizerClient client with 3.x.x:
+```java
+FormRecognizerClient formRecognizerClient = new FormRecognizerClientBuilder()
+ .credential(new AzureKeyCredential("{key}"))
+ .endpoint("{endpoint}")
+ .buildClient();
+```
+
+Instantiating DocumentAnalysisClient client with 4.x.x:
+
+```java
+DocumentAnalysisClient documentAnalysisClient = new DocumentAnalysisClientBuilder()
+ .credential(new AzureKeyCredential("{key}"))
+ .endpoint("{endpoint}")
+ .buildClient();
+```
+Similarly, with 4.x.x, the `FormTrainingClient` and `FormTrainingAsyncClient` has been replaced by the `DocumentModelAdministrationClient`
+and `DocumentModelAdministrationAsyncClient`, instantiated via the [DocumentModelAdministrationClientBuilder][DocumentModelAdministrationClientBuilder].
+The sync and async operations are separated to [DocumentModelAdministrationClient][DocumentModelAdministrationClient] and [DocumentModelAdministrationAsyncClient][DocumentModelAdministrationAsyncClient].
+
+Instantiating FormRecognizerClient client with 3.x.x:
+```java
+FormTrainingClient formTrainingClient = new FormTrainingClientBuilder()
+ .credential(new AzureKeyCredential("{key}"))
+ .endpoint("{endpoint}")
+ .buildClient();
+```
+
+Instantiating DocumentModelAdministrationClient client with 4.x.x:
+
+```java
+DocumentModelAdministrationClient documentModelAdminClient = new DocumentModelAdministrationClientBuilder()
+ .credential(new AzureKeyCredential("{key}"))
+ .endpoint("{endpoint}")
+ .buildClient();
+```
+
+#### Analyze documents
+
+With 4.x.x, the unified method, `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl`:
+- accepts a string type `modelId` to be any of the prebuilt model IDs or a custom model ID.
+- returns the `AnalyzeResult` model now exposes document elements, such as key-value pairs, entities, tables,
+ document fields and values at the top level of the returned model. As compared to the previously returned model
+ `RecognizedForm` which included hierarchical relationships between `FormElements` for instance tables were an element
+ of a `FormPage` and not a top-level element.
+- provides the functionality of `beginRecognizeCustomForms`, `beginRecognizeContent`, `beginRecognizeReceipt`,
+ `beginRecognizeReceipts`, `beginRecognizeInvoices` `beginRecognizeIdentityDocuments` and `beginRecognizeBusinessCards` from the previous (azure-ai-formrecognizer 3.1.X - below) package versions.
+- accepts unified `AnalyzeDocumentOptions` to specify pages and locale information for the outgoing request
+- the `includeFieldElements` parameter is not supported with the `DocumentAnalysisClient`, text details are automatically included with API version `2021-09-30-preview` and later.
+- the `readingOrder` parameter does not exist as the service uses `natural` reading order for the returned data.
+
+#### Using a prebuilt model
+- In 3.x.x, `beginRecognizeReceipts` and `beginRecognizeReceiptsFromUrl` method was used to analyze receipts.
+- In 4.x.x, `beginRecognizeReceipts` and `beginRecognizeReceiptsFromUrl` has been replaced with `beginAnalyzeDocument` and `beginAnalyzeDocumentFromUrl` respectively.
+>NOTE: The `beginAnalyzeMethod` and `beginAnalyzeDocumentFromUrl` applies to all prebuilt models listed [here][service_supported_models].
+
+Analyze receipt using 3.x.x `beginRecognizeReceipts`:
+```java
+String receiptUrl = "https://docs.microsoft.com/azure/cognitive-services/form-recognizer/media"
+ + "/contoso-allinone.jpg";
+SyncPoller> syncPoller =
+ formRecognizerClient.beginRecognizeReceiptsFromUrl(receiptUrl);
+List receiptPageResults = syncPoller.getFinalResult();
+
+for (int i = 0; i < receiptPageResults.size(); i++) {
+ RecognizedForm recognizedForm = receiptPageResults.get(i);
+ Map recognizedFields = recognizedForm.getFields();
+ System.out.printf("----------- Recognizing receipt info for page %d -----------%n", i);
+ FormField merchantNameField = recognizedFields.get("MerchantName");
+ if (merchantNameField != null) {
+ if (FieldValueType.STRING == merchantNameField.getValue().getValueType()) {
+ String merchantName = merchantNameField.getValue().asString();
+ System.out.printf("Merchant Name: %s, confidence: %.2f%n",
+ merchantName, merchantNameField.getConfidence());
+ }
+ }
+
+ FormField merchantPhoneNumberField = recognizedFields.get("MerchantPhoneNumber");
+ if (merchantPhoneNumberField != null) {
+ if (FieldValueType.PHONE_NUMBER == merchantPhoneNumberField.getValue().getValueType()) {
+ String merchantAddress = merchantPhoneNumberField.getValue().asPhoneNumber();
+ System.out.printf("Merchant Phone number: %s, confidence: %.2f%n",
+ merchantAddress, merchantPhoneNumberField.getConfidence());
+ }
+ }
+
+ FormField transactionDateField = recognizedFields.get("TransactionDate");
+ if (transactionDateField != null) {
+ if (FieldValueType.DATE == transactionDateField.getValue().getValueType()) {
+ LocalDate transactionDate = transactionDateField.getValue().asDate();
+ System.out.printf("Transaction Date: %s, confidence: %.2f%n",
+ transactionDate, transactionDateField.getConfidence());
+ }
+ }
+
+ FormField receiptItemsField = recognizedFields.get("Items");
+ if (receiptItemsField != null) {
+ System.out.printf("Receipt Items: %n");
+ if (FieldValueType.LIST == receiptItemsField.getValue().getValueType()) {
+ List receiptItems = receiptItemsField.getValue().asList();
+ receiptItems.stream()
+ .filter(receiptItem -> FieldValueType.MAP == receiptItem.getValue().getValueType())
+ .map(formField -> formField.getValue().asMap())
+ .forEach(formFieldMap -> formFieldMap.forEach((key, formField) -> {
+ if ("Quantity".equals(key)) {
+ if (FieldValueType.FLOAT == formField.getValue().getValueType()) {
+ Float quantity = formField.getValue().asFloat();
+ System.out.printf("Quantity: %f, confidence: %.2f%n",
+ quantity, formField.getConfidence());
+ }
+ }
+ }));
+ }
+ }
+}
+```
+
+Analyze receipt data using 4.x.x `beginAnalyzeDocumentFromUrl`:
+
+```java
+String receiptUrl = "https://raw.githubusercontent.com/Azure/azure-sdk-for-java/main/sdk/formrecognizer"
+ + "/azure-ai-formrecognizer/src/samples/resources/sample-documents/receipts/contoso-allinone.jpg";
+
+SyncPoller analyzeReceiptPoller =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl("prebuilt-receipt", receiptUrl);
+
+AnalyzeResult receiptResults = analyzeReceiptPoller.getFinalResult();
+
+for (int i = 0; i < receiptResults.getDocuments().size(); i++) {
+ AnalyzedDocument analyzedReceipt = receiptResults.getDocuments().get(i);
+ Map receiptFields = analyzedReceipt.getFields();
+ System.out.printf("----------- Analyzing receipt info %d -----------%n", i);
+ DocumentField merchantNameField = receiptFields.get("MerchantName");
+ if (merchantNameField != null) {
+ if (DocumentFieldType.STRING == merchantNameField.getType()) {
+ String merchantName = merchantNameField.getValueString();
+ System.out.printf("Merchant Name: %s, confidence: %.2f%n",
+ merchantName, merchantNameField.getConfidence());
+ }
+ }
+
+ DocumentField merchantPhoneNumberField = receiptFields.get("MerchantPhoneNumber");
+ if (merchantPhoneNumberField != null) {
+ if (DocumentFieldType.PHONE_NUMBER == merchantPhoneNumberField.getType()) {
+ String merchantAddress = merchantPhoneNumberField.getValuePhoneNumber();
+ System.out.printf("Merchant Phone number: %s, confidence: %.2f%n",
+ merchantAddress, merchantPhoneNumberField.getConfidence());
+ }
+ }
+
+ DocumentField transactionDateField = receiptFields.get("TransactionDate");
+ if (transactionDateField != null) {
+ if (DocumentFieldType.DATE == transactionDateField.getType()) {
+ LocalDate transactionDate = transactionDateField.getValueDate();
+ System.out.printf("Transaction Date: %s, confidence: %.2f%n",
+ transactionDate, transactionDateField.getConfidence());
+ }
+ }
+
+ DocumentField receiptItemsField = receiptFields.get("Items");
+ if (receiptItemsField != null) {
+ System.out.printf("Receipt Items: %n");
+ if (DocumentFieldType.LIST == receiptItemsField.getType()) {
+ List receiptItems = receiptItemsField.getValueList();
+ receiptItems.stream()
+ .filter(receiptItem -> DocumentFieldType.MAP == receiptItem.getType())
+ .map(documentField -> documentField.getValueMap())
+ .forEach(documentFieldMap -> documentFieldMap.forEach((key, documentField) -> {
+ if ("Name".equals(key)) {
+ if (DocumentFieldType.STRING == documentField.getType()) {
+ String name = documentField.getValueString();
+ System.out.printf("Name: %s, confidence: %.2fs%n",
+ name, documentField.getConfidence());
+ }
+ }
+ if ("Quantity".equals(key)) {
+ if (DocumentFieldType.FLOAT == documentField.getType()) {
+ Float quantity = documentField.getValueFloat();
+ System.out.printf("Quantity: %f, confidence: %.2f%n",
+ quantity, documentField.getConfidence());
+ }
+ }
+ }));
+ }
+ }
+}
+```
+#### Using a layout model
+Analyze layout using 3.x.x `beginRecognizeContent`:
+```java
+// recognize form content using file input stream
+File form = new File("local/file_path/filename.png");
+byte[] fileContent = Files.readAllBytes(form.toPath());
+InputStream inputStream = new ByteArrayInputStream(fileContent);
+
+SyncPoller> recognizeContentPoller =
+ formRecognizerClient.beginRecognizeContent(inputStream, form.length());
+
+List contentPageResults = recognizeContentPoller.getFinalResult();
+
+for (int i = 0; i < contentPageResults.size(); i++) {
+ FormPage formPage = contentPageResults.get(i);
+ System.out.printf("----Recognizing content info for page %d ----%n", i);
+ // Table information
+ System.out.printf("Has width: %f and height: %f, measured with unit: %s.%n", formPage.getWidth(),
+ formPage.getHeight(),
+ formPage.getUnit());
+ formPage.getTables().forEach(formTable -> {
+ System.out.printf("Table has %d rows and %d columns.%n", formTable.getRowCount(),
+ formTable.getColumnCount());
+ formTable.getCells().forEach(formTableCell ->
+ System.out.printf("Cell has text %s.%n", formTableCell.getText()));
+ });
+ // Selection Mark
+ formPage.getSelectionMarks().forEach(selectionMark -> System.out.printf(
+ "Page: %s, Selection mark is %s within bounding box %s has a confidence score %.2f.%n",
+ selectionMark.getPageNumber(), selectionMark.getState(), selectionMark.getBoundingBox().toString(),
+ selectionMark.getConfidence()));
+}
+```
+
+Analyze layout using 4.x.x `beginAnalyzeDocument`:
+
+```java
+// analyze document layout using file input stream
+File layoutDocument = new File("local/file_path/filename.png");
+byte[] fileContent = Files.readAllBytes(layoutDocument.toPath());
+InputStream fileStream = new ByteArrayInputStream(fileContent);
+
+SyncPoller analyzeLayoutResultPoller =
+ documentAnalysisClient.beginAnalyzeDocument("prebuilt-layout", fileStream, layoutDocument.length());
+
+AnalyzeResult analyzeLayoutResult = analyzeLayoutResultPoller.getFinalResult();
+
+// pages
+analyzeLayoutResult.getPages().forEach(documentPage -> {
+ System.out.printf("Page has width: %.2f and height: %.2f, measured with unit: %s%n",
+ documentPage.getWidth(),
+ documentPage.getHeight(),
+ documentPage.getUnit());
+
+ // lines
+ documentPage.getLines().forEach(documentLine ->
+ System.out.printf("Line %s is within a bounding box %s.%n",
+ documentLine.getContent(),
+ documentLine.getBoundingBox().toString()));
+
+ // selection marks
+ documentPage.getSelectionMarks().forEach(documentSelectionMark ->
+ System.out.printf("Selection mark is %s and is within a bounding box %s with confidence %.2f.%n",
+ documentSelectionMark.getState().toString(),
+ documentSelectionMark.getBoundingBox().toString(),
+ documentSelectionMark.getConfidence()));
+});
+
+// tables
+List tables = analyzeLayoutResult.getTables();
+for (int i = 0; i < tables.size(); i++) {
+ DocumentTable documentTable = tables.get(i);
+ System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
+ documentTable.getColumnCount());
+ documentTable.getCells().forEach(documentTableCell -> {
+ System.out.printf("Cell '%s', has row index %d and column index %d.%n", documentTableCell.getContent(),
+ documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
+ });
+ System.out.println();
+}
+```
+
+#### Using a custom model
+Analyze custom document using 3.x.x `beginRecognizeCustomFormsFromUrl`:
+```java
+String formUrl = "{form_url}";
+String modelId = "{custom_trained_model_id}";
+SyncPoller> recognizeFormPoller =
+ formRecognizerClient.beginRecognizeCustomFormsFromUrl(modelId, formUrl);
+
+List recognizedForms = recognizeFormPoller.getFinalResult();
+
+for (int i = 0; i < recognizedForms.size(); i++) {
+ RecognizedForm form = recognizedForms.get(i);
+ System.out.printf("----------- Recognized custom form info for page %d -----------%n", i);
+ System.out.printf("Form type: %s%n", form.getFormType());
+ System.out.printf("Form type confidence: %.2f%n", form.getFormTypeConfidence());
+ form.getFields().forEach((label, formField) ->
+ System.out.printf("Field %s has value %s with confidence score of %f.%n", label,
+ formField.getValueData().getText(),
+ formField.getConfidence())
+ );
+}
+```
+
+Analyze custom document using 4.x.x `beginAnalyzeDocumentFromUrl`
+
+```java
+String documentUrl = "{document-url}";
+String modelId = "{custom-built-model-ID}";
+SyncPoller analyzeDocumentPoller =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl(modelId, documentUrl);
+
+AnalyzeResult analyzeResult = analyzeDocumentPoller.getFinalResult();
+
+for (int i = 0; i < analyzeResult.getDocuments().size(); i++) {
+ final AnalyzedDocument analyzedDocument = analyzeResult.getDocuments().get(i);
+ System.out.printf("----------- Analyzing custom document %d -----------%n", i);
+ System.out.printf("Analyzed document has doc type %s with confidence : %.2f%n",
+ analyzedDocument.getDocType(), analyzedDocument.getConfidence());
+ analyzedDocument.getFields().forEach((key, documentField) -> {
+ System.out.printf("Document Field content: %s%n", documentField.getContent());
+ System.out.printf("Document Field confidence: %.2f%n", documentField.getConfidence());
+ System.out.printf("Document Field Type: %.2f%n", documentField.getType().toString());
+ System.out.printf("Document Field found within bounding region: %s%n",
+ documentField.getBoundingRegions().toString());
+ });
+}
+
+analyzeResult.getPages().forEach(documentPage -> {
+ System.out.printf("Page has width: %.2f and height: %.2f, measured with unit: %s%n",
+ documentPage.getWidth(),
+ documentPage.getHeight(),
+ documentPage.getUnit());
+
+ // lines
+ documentPage.getLines().forEach(documentLine ->
+ System.out.printf("Line %s is within a bounding box %s.%n",
+ documentLine.getContent(),
+ documentLine.getBoundingBox().toString()));
+
+ // words
+ documentPage.getWords().forEach(documentWord ->
+ System.out.printf("Word %s has a confidence score of %.2f%n.",
+ documentWord.getContent(),
+ documentWord.getConfidence()));
+});
+
+// tables
+List tables = analyzeResult.getTables();
+for (int i = 0; i < tables.size(); i++) {
+ DocumentTable documentTable = tables.get(i);
+ System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
+ documentTable.getColumnCount());
+ documentTable.getCells().forEach(documentTableCell -> {
+ System.out.printf("Cell '%s', has row index %d and column index %d.%n",
+ documentTableCell.getContent(),
+ documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
+ });
+ System.out.println();
+}
+```
+
+Analyzing general prebuilt document types with 4.x.x:
+> NOTE: Analyzing a document with the prebuilt-document model replaces training without labels in version 3.1.x of the library.
+
+```java
+String documentUrl = "{document-url}";
+String modelId = "prebuilt-document";
+SyncPoller analyzeDocumentPoller =
+ documentAnalysisClient.beginAnalyzeDocumentFromUrl(modelId, documentUrl);
+
+AnalyzeResult analyzeResult = analyzeDocumentPoller.getFinalResult();
+
+for (int i = 0; i < analyzeResult.getDocuments().size(); i++) {
+ final AnalyzedDocument analyzedDocument = analyzeResult.getDocuments().get(i);
+ System.out.printf("----------- Analyzing document %d -----------%n", i);
+ System.out.printf("Analyzed document has doc type %s with confidence : %.2f%n",
+ analyzedDocument.getDocType(), analyzedDocument.getConfidence());
+}
+
+analyzeResult.getPages().forEach(documentPage -> {
+ System.out.printf("Page has width: %.2f and height: %.2f, measured with unit: %s%n",
+ documentPage.getWidth(),
+ documentPage.getHeight(),
+ documentPage.getUnit());
+
+ // lines
+ documentPage.getLines().forEach(documentLine ->
+ System.out.printf("Line %s is within a bounding box %s.%n",
+ documentLine.getContent(),
+ documentLine.getBoundingBox().toString()));
+
+ // words
+ documentPage.getWords().forEach(documentWord ->
+ System.out.printf("Word %s has a confidence score of %.2f%n.",
+ documentWord.getContent(),
+ documentWord.getConfidence()));
+});
+
+// tables
+List tables = analyzeResult.getTables();
+for (int i = 0; i < tables.size(); i++) {
+ DocumentTable documentTable = tables.get(i);
+ System.out.printf("Table %d has %d rows and %d columns.%n", i, documentTable.getRowCount(),
+ documentTable.getColumnCount());
+ documentTable.getCells().forEach(documentTableCell -> {
+ System.out.printf("Cell '%s', has row index %d and column index %d.%n",
+ documentTableCell.getContent(),
+ documentTableCell.getRowIndex(), documentTableCell.getColumnIndex());
+ });
+ System.out.println();
+}
+
+// Entities
+analyzeResult.getEntities().forEach(documentEntity -> {
+ System.out.printf("Entity category : %s, sub-category %s%n: ",
+ documentEntity.getCategory(), documentEntity.getSubCategory());
+ System.out.printf("Entity content: %s%n: ", documentEntity.getContent());
+ System.out.printf("Entity confidence: %.2f%n", documentEntity.getConfidence());
+});
+
+// Key-value
+analyzeResult.getKeyValuePairs().forEach(documentKeyValuePair -> {
+ System.out.printf("Key content: %s%n", documentKeyValuePair.getKey().getContent());
+ System.out.printf("Key content bounding region: %s%n",
+ documentKeyValuePair.getKey().getBoundingRegions().toString());
+
+ System.out.printf("Value content: %s%n", documentKeyValuePair.getValue().getContent());
+ System.out.printf("Value content bounding region: %s%n", documentKeyValuePair.getValue().getBoundingRegions().toString());
+});
+```
+
+#### Build a custom document analysis model
+- In 3.x.x, creating a custom model required specifying `useTrainingLabels` to indicate whether to use labeled data when creating the custom model with the `beginTraining` method.
+- In 4.x.x, we introduced the new general document model (prebuilt-document) to replace the train without labels
+functionality from 3.x.x which extracts entities, key-value pairs, and layout from a document with the `beginBuildModel` method.
+In 4.x.x the `beginBuildModel` always returns labeled data otherwise.
+
+Train a custom model using 3.x.x `beginTraining`:
+```java
+String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}";
+SyncPoller trainingPoller =
+ formTrainingClient.beginTraining(trainingFilesUrl,
+ false,
+ new TrainingOptions()
+ .setModelName("my model trained without labels"),
+ Context.NONE);
+
+CustomFormModel customFormModel = trainingPoller.getFinalResult();
+
+// Model Info
+System.out.printf("Model Id: %s%n", customFormModel.getModelId());
+System.out.printf("Model name given by user: %s%n", customFormModel.getModelName());
+System.out.printf("Model Status: %s%n", customFormModel.getModelStatus());
+System.out.printf("Training started on: %s%n", customFormModel.getTrainingStartedOn());
+System.out.printf("Training completed on: %s%n%n", customFormModel.getTrainingCompletedOn());
+
+System.out.println("Recognized Fields:");
+// looping through the subModels, which contains the fields they were trained on
+// Since the given training documents are unlabeled we still group them but, they do not have a label.
+customFormModel.getSubmodels().forEach(customFormSubmodel -> {
+ System.out.printf("Submodel Id: %s%n: ", customFormSubmodel.getModelId());
+ // Since the training data is unlabeled, we are unable to return the accuracy of this model
+ customFormSubmodel.getFields().forEach((field, customFormModelField) ->
+ System.out.printf("Field: %s Field Label: %s%n",
+ field, customFormModelField.getLabel()));
+});
+
+System.out.println();
+customFormModel.getTrainingDocuments().forEach(trainingDocumentInfo -> {
+ System.out.printf("Document name: %s%n", trainingDocumentInfo.getName());
+ System.out.printf("Document status: %s%n", trainingDocumentInfo.getStatus());
+ System.out.printf("Document page count: %d%n", trainingDocumentInfo.getPageCount());
+ if (!trainingDocumentInfo.getErrors().isEmpty()) {
+ System.out.println("Document Errors:");
+ trainingDocumentInfo.getErrors().forEach(formRecognizerError ->
+ System.out.printf("Error code %s, Error message: %s%n", formRecognizerError.getErrorCode(),
+ formRecognizerError.getMessage()));
+ }
+});
+```
+
+Build a custom document model using 4.x.x `beginBuildModel`:
+
+```java
+// Build custom document analysis model
+String trainingFilesUrl = "{SAS_URL_of_your_container_in_blob_storage}";
+// The shared access signature (SAS) Url of your Azure Blob Storage container with your forms.
+SyncPoller buildOperationPoller =
+ documentModelAdminClient.beginBuildModel(trainingFilesUrl,
+ "my-build-model",
+ new BuildModelOptions().setDescription("model desc"),
+ Context.NONE);
+
+DocumentModel documentModel = buildOperationPoller.getFinalResult();
+
+// Model Info
+System.out.printf("Model ID: %s%n", documentModel.getModelId());
+System.out.printf("Model Description: %s%n", documentModel.getDescription());
+System.out.printf("Model created on: %s%n%n", documentModel.getCreatedOn());
+documentModel.getDocTypes().forEach((key, docTypeInfo) -> {
+ System.out.printf("Document type: %s%n", key);
+ docTypeInfo.getFieldSchema().forEach((name, documentFieldSchema) -> {
+ System.out.printf("Document field: %s%n", name);
+ System.out.printf("Document field type: %s%n", documentFieldSchema.getType().toString());
+ System.out.printf("Document field confidence: %.2f%n", docTypeInfo.getFieldConfidence().get(name));
+ });
+});
+```
+
+### Manage models
+In 3.x.x, listing models returned only the custom trained models using the `listCustomModel` method.
+
+With 4.x.x, list Models operation `listModels`:
+- returns a paged list of prebuilt in addition to custom models.
+- no longer includes submodels, instead a model can analyze different document types.
+- Only returns custom models that are built successfully.
+Unsuccessful model operations can be viewed with the get and list operation methods (note that document model operation data persists for only 24 hours).
+- In version `3.1.x` of the library, models that had not succeeded were still created, had to be deleted by the user,
+and were returned in the list models response.
+
+## Additional samples
+
+For additional samples please take a look at the [Form Recognizer samples][README-Samples]
+
+
+[DocumentAnalysisClientBuilder]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClientBuilder.java
+[DocumentAnalysisClient]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java
+[DocumentAnalysisAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java
+[DocumentModelAdministrationClientBuilder]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClientBuilder.java
+[DocumentModelAdministrationClient]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationClient.java
+[DocumentModelAdministrationAsyncClient]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/administration/DocumentModelAdministrationAsyncClient.java
+[Guidelines]: https://azure.github.io/azure-sdk/general_introduction.html
+[GuidelinesJava]: https://azure.github.io/azure-sdk/java_introduction.html
+[GuidelinesJavaDesign]: https://azure.github.io/azure-sdk/java_introduction.html#namespaces
+[README-Samples]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/src/samples/README.md
+[README]: https://github.com/Azure/azure-sdk-for-java/blob/main/sdk/formrecognizer/azure-ai-formrecognizer/README.md
+
+
+![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Fformrecognizer%2Fazure-ai-formrecognizer%2Fmigration-guide.png)
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
index c57fed2add743..5474591714b25 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/pom.xml
@@ -13,7 +13,7 @@
com.azure
azure-ai-formrecognizer
- 3.2.0-beta.1
+ 4.0.0-beta.1
Microsoft Azure client library for Form Recognizer
This package contains the Microsoft Azure Cognitive Services Form Recognizer SDK.
@@ -36,8 +36,8 @@
--add-exports com.azure.core/com.azure.core.implementation.http=ALL-UNNAMED
-
--add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer=ALL-UNNAMED
+ --add-opens com.azure.ai.formrecognizer/com.azure.ai.formrecognizer.administration=ALL-UNNAMED
@@ -45,25 +45,25 @@
com.azure
azure-core
- 1.20.0
+ 1.21.0
com.azure
azure-core-http-netty
- 1.11.0
+ 1.11.1
com.azure
azure-core-test
- 1.7.1
+ 1.7.2
test
com.azure
azure-core-http-okhttp
- 1.7.3
+ 1.7.4
test
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java
new file mode 100644
index 0000000000000..ee3459f553829
--- /dev/null
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisAsyncClient.java
@@ -0,0 +1,327 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.formrecognizer;
+
+import com.azure.ai.formrecognizer.implementation.FormRecognizerClientImpl;
+import com.azure.ai.formrecognizer.implementation.models.AnalyzeDocumentRequest;
+import com.azure.ai.formrecognizer.implementation.models.AnalyzeResultOperation;
+import com.azure.ai.formrecognizer.implementation.models.OperationStatus;
+import com.azure.ai.formrecognizer.implementation.models.StringIndexType;
+import com.azure.ai.formrecognizer.implementation.util.Transforms;
+import com.azure.ai.formrecognizer.models.AnalyzeDocumentOptions;
+import com.azure.ai.formrecognizer.models.AnalyzeResult;
+import com.azure.ai.formrecognizer.models.DocumentAnalysisException;
+import com.azure.ai.formrecognizer.models.DocumentOperationResult;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.http.HttpPipeline;
+import com.azure.core.http.rest.Response;
+import com.azure.core.util.Context;
+import com.azure.core.util.CoreUtils;
+import com.azure.core.util.logging.ClientLogger;
+import com.azure.core.util.polling.LongRunningOperationStatus;
+import com.azure.core.util.polling.PollResponse;
+import com.azure.core.util.polling.PollerFlux;
+import com.azure.core.util.polling.PollingContext;
+import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+
+import java.nio.ByteBuffer;
+import java.util.Objects;
+import java.util.function.Function;
+
+import static com.azure.ai.formrecognizer.implementation.util.Constants.DEFAULT_POLL_INTERVAL;
+import static com.azure.ai.formrecognizer.implementation.util.Utility.activationOperation;
+import static com.azure.core.util.FluxUtil.monoError;
+
+/**
+ * This class provides an asynchronous client that contains the operations that apply to Azure Form Recognizer.
+ * Operations allowed by the client are analyzing information from documents and images using custom-built document
+ * analysis models, prebuilt models for invoices, receipts, identity documents and business cards, and the layout model.
+ *
+ * Instantiating an asynchronous Document Analysis Client
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.instantiation}
+ *
+ * @see DocumentAnalysisClientBuilder
+ */
+@ServiceClient(builder = DocumentAnalysisClientBuilder.class, isAsync = true)
+public final class DocumentAnalysisAsyncClient {
+ private final ClientLogger logger = new ClientLogger(DocumentAnalysisAsyncClient.class);
+ private final FormRecognizerClientImpl service;
+ private final DocumentAnalysisServiceVersion serviceVersion;
+
+ /**
+ * Create a {@link DocumentAnalysisAsyncClient} that sends requests to the Form recognizer service's endpoint. Each
+ * service call goes through the {@link DocumentAnalysisClientBuilder#pipeline(HttpPipeline)} http pipeline}.
+ *
+ * @param service The proxy service used to perform REST calls.
+ * @param serviceVersion The versions of Azure Form Recognizer service supported by this client library.
+ */
+ DocumentAnalysisAsyncClient(FormRecognizerClientImpl service, DocumentAnalysisServiceVersion serviceVersion) {
+ this.service = service;
+ this.serviceVersion = serviceVersion;
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.beginAnalyzeDocumentFromUrl#string-string}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param documentUrl The URL of the document to analyze.
+ *
+ * @return A {@link PollerFlux} that polls the progress of the analyze document operation until it has completed, has failed,
+ * or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}..
+ * @throws NullPointerException If {@code documentUrl} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginAnalyzeDocumentFromUrl(String modelId, String documentUrl) {
+ return beginAnalyzeDocumentFromUrl(modelId, documentUrl, null);
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.beginAnalyzeDocumentFromUrl#string-string-AnalyzeDocumentOptions}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param documentUrl The source URL to the input form.
+ * @param analyzeDocumentOptions The additional configurable {@link AnalyzeDocumentOptions options}
+ * that may be passed when analyzing documents.
+ * @return A {@link PollerFlux} that polls progress of the analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}.
+ * @throws NullPointerException If {@code documentUrl} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginAnalyzeDocumentFromUrl(String modelId, String documentUrl,
+ AnalyzeDocumentOptions analyzeDocumentOptions) {
+ return beginAnalyzeDocumentFromUrl(documentUrl, modelId, analyzeDocumentOptions, Context.NONE);
+ }
+
+ PollerFlux
+ beginAnalyzeDocumentFromUrl(String documentUrl, String modelId,
+ AnalyzeDocumentOptions analyzeDocumentOptions,
+ Context context) {
+ try {
+ Objects.requireNonNull(documentUrl, "'documentUrl' is required and cannot be null.");
+ Objects.requireNonNull(modelId, "'modelId' is required and cannot be null.");
+
+ final AnalyzeDocumentOptions finalAnalyzeDocumentOptions
+ = getAnalyzeDocumentOptions(analyzeDocumentOptions);
+ return new PollerFlux<>(
+ DEFAULT_POLL_INTERVAL,
+ activationOperation(() ->
+ service.analyzeDocumentWithResponseAsync(modelId,
+ CoreUtils.isNullOrEmpty(finalAnalyzeDocumentOptions.getPages())
+ ? null : String.join(",", finalAnalyzeDocumentOptions.getPages()),
+ finalAnalyzeDocumentOptions.getLocale() == null ? null
+ : finalAnalyzeDocumentOptions.getLocale(),
+ StringIndexType.UTF16CODE_UNIT,
+ new AnalyzeDocumentRequest().setUrlSource(documentUrl),
+ context)
+ .map(analyzeDocumentResponse ->
+ Transforms.toFormRecognizerOperationResult(
+ analyzeDocumentResponse.getDeserializedHeaders().getOperationLocation())),
+ logger),
+ pollingOperation(resultId ->
+ service.getAnalyzeDocumentResultWithResponseAsync(modelId, resultId, context)),
+ (activationResponse, pollingContext) ->
+ Mono.error(new RuntimeException("Cancellation is not supported")),
+ fetchingOperation(resultId ->
+ service.getAnalyzeDocumentResultWithResponseAsync(
+ modelId,
+ resultId,
+ context))
+ .andThen(after -> after
+ .map(modelSimpleResponse ->
+ Transforms.toAnalyzeResultOperation(modelSimpleResponse.getValue().getAnalyzeResult()))
+ .onErrorMap(Transforms::mapToHttpResponseExceptionIfExists)));
+ } catch (RuntimeException ex) {
+ return PollerFlux.error(ex);
+ }
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Note that the {@code data} passed must be replayable if retries are enabled (the default). In other words, the
+ * {@code Flux} must produce the same data each time it is subscribed to.
+ *
+ *
Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.beginAnalyzeDocument#string-Flux-long}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param document The data of the document to analyze information from.
+ * @param length The exact length of the data.
+ *
+ * @return A {@link PollerFlux} that polls the progress of the analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}.
+ * @throws NullPointerException If {@code document} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginAnalyzeDocument(String modelId, Flux document, long length) {
+ return beginAnalyzeDocument(modelId, document, length, null);
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Note that the {@code data} passed must be replayable if retries are enabled (the default). In other words, the
+ * {@code Flux} must produce the same data each time it is subscribed to.
+ *
+ *
Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.beginAnalyzeDocument#string-Flux-long-AnalyzeDocumentOptions}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param document The data of the document to analyze information from.
+ * @param length The exact length of the data.
+ * @param analyzeDocumentOptions The additional configurable {@link AnalyzeDocumentOptions options} that may be
+ * passed when analyzing documents.
+ *
+ * @return A {@link PollerFlux} that polls the progress of the analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}..
+ * @throws NullPointerException If {@code document} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public PollerFlux
+ beginAnalyzeDocument(String modelId, Flux document, long length,
+ AnalyzeDocumentOptions analyzeDocumentOptions) {
+ return beginAnalyzeDocument(modelId, document, length, analyzeDocumentOptions, Context.NONE);
+ }
+
+ PollerFlux
+ beginAnalyzeDocument(String modelId, Flux document, long length,
+ AnalyzeDocumentOptions analyzeDocumentOptions, Context context) {
+ try {
+ Objects.requireNonNull(document, "'document' is required and cannot be null.");
+ Objects.requireNonNull(modelId, "'modelId' is required and cannot be null.");
+
+ final AnalyzeDocumentOptions finalAnalyzeDocumentOptions
+ = getAnalyzeDocumentOptions(analyzeDocumentOptions);
+
+ return new PollerFlux<>(
+ DEFAULT_POLL_INTERVAL,
+ activationOperation(() ->
+ service.analyzeDocumentWithResponseAsync(modelId,
+ null,
+ CoreUtils.isNullOrEmpty(finalAnalyzeDocumentOptions.getPages())
+ ? null : String.join(",", finalAnalyzeDocumentOptions.getPages()),
+ finalAnalyzeDocumentOptions.getLocale() == null ? null
+ : finalAnalyzeDocumentOptions.getLocale(),
+ StringIndexType.UTF16CODE_UNIT,
+ document,
+ length,
+ context)
+ .map(analyzeDocumentResponse -> Transforms.toFormRecognizerOperationResult(
+ analyzeDocumentResponse.getDeserializedHeaders().getOperationLocation())),
+ logger),
+ pollingOperation(
+ resultId -> service.getAnalyzeDocumentResultWithResponseAsync(
+ modelId, resultId, context)),
+ (activationResponse, pollingContext) ->
+ Mono.error(new RuntimeException("Cancellation is not supported")),
+ fetchingOperation(resultId -> service.getAnalyzeDocumentResultWithResponseAsync(
+ modelId, resultId, context))
+ .andThen(after -> after.map(modelSimpleResponse ->
+ Transforms.toAnalyzeResultOperation(modelSimpleResponse.getValue().getAnalyzeResult()))
+ .onErrorMap(Transforms::mapToHttpResponseExceptionIfExists)));
+ } catch (RuntimeException ex) {
+ return PollerFlux.error(ex);
+ }
+ }
+
+ /*
+ * Poller's POLLING operation.
+ */
+ private Function, Mono>>
+ pollingOperation(
+ Function>> pollingFunction) {
+ return pollingContext -> {
+ try {
+ final PollResponse operationResultPollResponse
+ = pollingContext.getLatestResponse();
+ final String resultId = operationResultPollResponse.getValue().getResultId();
+ return pollingFunction.apply(resultId)
+ .flatMap(modelResponse -> processAnalyzeModelResponse(modelResponse, operationResultPollResponse))
+ .onErrorMap(Transforms::mapToHttpResponseExceptionIfExists);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ };
+ }
+
+ /*
+ * Poller's FETCHING operation.
+ */
+ private Function, Mono>>
+ fetchingOperation(
+ Function>> fetchingFunction) {
+ return pollingContext -> {
+ try {
+ final String resultId = pollingContext.getLatestResponse().getValue().getResultId();
+ return fetchingFunction.apply(resultId);
+ } catch (RuntimeException ex) {
+ return monoError(logger, ex);
+ }
+ };
+ }
+
+ private Mono> processAnalyzeModelResponse(
+ Response analyzeResultOperationResponse,
+ PollResponse operationResultPollResponse) {
+ LongRunningOperationStatus status;
+ switch (analyzeResultOperationResponse.getValue().getStatus()) {
+ case NOT_STARTED:
+ case RUNNING:
+ status = LongRunningOperationStatus.IN_PROGRESS;
+ break;
+ case SUCCEEDED:
+ status = LongRunningOperationStatus.SUCCESSFULLY_COMPLETED;
+ break;
+ case FAILED:
+ // TODO (Revisit error logic https://github.com/Azure/azure-sdk-for-java-pr/issues/1337)
+ throw logger.logExceptionAsError(
+ Transforms.toDocumentAnalysisException(analyzeResultOperationResponse.getValue().getError()));
+ default:
+ status = LongRunningOperationStatus.fromString(
+ analyzeResultOperationResponse.getValue().getStatus().toString(), true);
+ break;
+ }
+ return Mono.just(new PollResponse<>(status, operationResultPollResponse.getValue()));
+ }
+
+ private static AnalyzeDocumentOptions getAnalyzeDocumentOptions(AnalyzeDocumentOptions userProvidedOptions) {
+ return userProvidedOptions == null ? new AnalyzeDocumentOptions() : userProvidedOptions;
+ }
+}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java
new file mode 100644
index 0000000000000..a56d6bb67189b
--- /dev/null
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClient.java
@@ -0,0 +1,160 @@
+// Copyright (c) Microsoft Corporation. All rights reserved.
+// Licensed under the MIT License.
+
+package com.azure.ai.formrecognizer;
+
+import com.azure.ai.formrecognizer.models.AnalyzeDocumentOptions;
+import com.azure.ai.formrecognizer.models.DocumentAnalysisException;
+import com.azure.ai.formrecognizer.implementation.models.AnalyzeResultOperation;
+import com.azure.ai.formrecognizer.implementation.models.OperationStatus;
+import com.azure.ai.formrecognizer.models.AnalyzeResult;
+import com.azure.ai.formrecognizer.models.DocumentOperationResult;
+import com.azure.core.annotation.ReturnType;
+import com.azure.core.annotation.ServiceClient;
+import com.azure.core.annotation.ServiceMethod;
+import com.azure.core.util.Context;
+import com.azure.core.util.polling.SyncPoller;
+import reactor.core.publisher.Flux;
+
+import java.io.InputStream;
+import java.nio.ByteBuffer;
+
+import static com.azure.ai.formrecognizer.implementation.util.Utility.toFluxByteBuffer;
+
+/**
+ * This class provides a synchronous client that contains the operations that apply to Azure Form Recognizer.
+ * Operations allowed by the client are analyzing information from documents and images using custom-built document
+ * analysis models, prebuilt models for invoices, receipts, identity documents and business cards, and the layout model.
+ *
+ * Instantiating a synchronous Document Analysis Client
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.instantiation}
+ *
+ * @see DocumentAnalysisClientBuilder
+ */
+@ServiceClient(builder = DocumentAnalysisClientBuilder.class)
+public final class DocumentAnalysisClient {
+ private final DocumentAnalysisAsyncClient client;
+
+ /**
+ * Create a {@link DocumentAnalysisClient client} that sends requests to the Document Analysis service's endpoint.
+ * Each service call goes through the {@link DocumentAnalysisClientBuilder#pipeline http pipeline}.
+ *
+ * @param client The {@link DocumentAnalysisClient} that the client routes its request through.
+ */
+ DocumentAnalysisClient(DocumentAnalysisAsyncClient client) {
+ this.client = client;
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an error message
+ * indicating absence of cancellation support
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.beginAnalyzeDocumentFromUrl#string-string}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param documentUrl The URL of the document to analyze.
+ *
+ * @return A {@link SyncPoller} to poll the progress of the analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}..
+ * @throws NullPointerException If {@code documentUrl} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginAnalyzeDocumentFromUrl(String modelId, String documentUrl) {
+ return beginAnalyzeDocumentFromUrl(modelId, documentUrl, null, Context.NONE);
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.beginAnalyzeDocumentFromUrl#string-string-AnalyzeDocumentOptions-Context}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param documentUrl The source URL to the input document.
+ * @param analyzeDocumentOptions The additional configurable {@link AnalyzeDocumentOptions options} that may be
+ * passed when analyzing documents.
+ * @param context Additional context that is passed through the HTTP pipeline during the service call.
+ *
+ * @return A {@link SyncPoller} to poll the progress of the analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation}returns
+ * with an {@link OperationStatus#FAILED}.
+ * @throws NullPointerException If {@code documentUrl} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginAnalyzeDocumentFromUrl(String modelId, String documentUrl,
+ AnalyzeDocumentOptions analyzeDocumentOptions, Context context) {
+ return client.beginAnalyzeDocumentFromUrl(documentUrl, modelId,
+ analyzeDocumentOptions, context).getSyncPoller();
+ }
+
+ /**
+ * Analyzes data from documents using optical character recognition (OCR) using any of the prebuilt models or
+ * a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.beginAnalyzeDocument#string-InputStream-long}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param document The data of the document to analyze information from.
+ * @param length The exact length of the data.
+ *
+ * @return A {@link SyncPoller} that polls the of progress of analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation}returns
+ * with an {@link OperationStatus#FAILED}.
+ * @throws NullPointerException If {@code document} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginAnalyzeDocument(String modelId, InputStream document, long length) {
+ return beginAnalyzeDocument(modelId, document, length, null, Context.NONE);
+ }
+
+ /**
+ * Analyzes data from documents with optical character recognition (OCR) and semantic values from a given document
+ * using any of the prebuilt models or a custom-built analysis model.
+ * The service does not support cancellation of the long running operation and returns with an
+ * error message indicating absence of cancellation support.
+ *
+ * Code sample
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.beginAnalyzeDocument#string-InputStream-long-AnalyzeDocumentOptions-Context}
+ *
+ * @param modelId The unique model ID to be used or the supported prebuilt models - "prebuilt-receipt",
+ * "prebuilt-businessCard", "prebuilt-idDocument", "prebuilt-document", "prebuilt-invoice", "prebuilt-layout".
+ * @param document The data of the document to analyze information from.
+ * @param length The exact length of the data.
+ * @param analyzeDocumentOptions The additional configurable {@link AnalyzeDocumentOptions options} that may be
+ * passed when analyzing documents.
+ * @param context Additional context that is passed through the HTTP pipeline during the service call.
+ *
+ * @return A {@link SyncPoller} that polls the of progress of analyze document operation until it has completed,
+ * has failed, or has been cancelled. The completed operation returns an {@link AnalyzeResult}.
+ * @throws DocumentAnalysisException If analyze operation fails and the {@link AnalyzeResultOperation} returns
+ * with an {@link OperationStatus#FAILED}.
+ * @throws NullPointerException If {@code document} or {@code modelId} is null.
+ */
+ @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
+ public SyncPoller
+ beginAnalyzeDocument(String modelId, InputStream document, long length,
+ AnalyzeDocumentOptions analyzeDocumentOptions, Context context) {
+ Flux buffer = toFluxByteBuffer(document);
+ return client.beginAnalyzeDocument(modelId, buffer, length,
+ analyzeDocumentOptions, context).getSyncPoller();
+ }
+}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClientBuilder.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClientBuilder.java
similarity index 63%
rename from sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClientBuilder.java
rename to sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClientBuilder.java
index d5278b52e1165..beaa70d1a2f47 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerClientBuilder.java
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisClientBuilder.java
@@ -3,9 +3,10 @@
package com.azure.ai.formrecognizer;
-import com.azure.ai.formrecognizer.implementation.Constants;
import com.azure.ai.formrecognizer.implementation.FormRecognizerClientImpl;
import com.azure.ai.formrecognizer.implementation.FormRecognizerClientImplBuilder;
+import com.azure.ai.formrecognizer.implementation.util.Constants;
+import com.azure.ai.formrecognizer.implementation.util.Utility;
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.credential.AzureKeyCredential;
import com.azure.core.credential.TokenCredential;
@@ -26,43 +27,41 @@
import java.util.List;
import java.util.Objects;
-import static com.azure.ai.formrecognizer.implementation.Utility.buildHttpPipeline;
-
/**
- * This class provides a fluent builder API to help instantiation of {@link FormRecognizerClient FormRecognizerClients}
- * and {@link FormRecognizerAsyncClient FormRecognizerAsyncClients}, call {@link #buildClient()} buildClient} and
+ * This class provides a fluent builder API to help instantiation of {@link DocumentAnalysisClient DocumentAnalysisClients}
+ * and {@link DocumentAnalysisAsyncClient DocumentAnalysisAsyncClients}, call {@link #buildClient()} buildClient} and
* {@link #buildAsyncClient() buildAsyncClient} respectively to construct an instance of the desired client.
*
*
- * The client needs the service endpoint of the Azure Form Recognizer to access the resource service.
+ * The client needs the service endpoint of the Azure Document Analysis to access the resource service.
* {@link #credential(AzureKeyCredential)} or {@link #credential(TokenCredential) credential(TokenCredential)} gives
* the builder access credential.
*
*
- * Instantiating an asynchronous Form Recognizer Client
+ * Instantiating an asynchronous Document Analysis Client
*
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.instantiation}
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisAsyncClient.instantiation}
*
- * Instantiating a synchronous Form Recognizer Client
+ * Instantiating a synchronous Document Analysis Client
*
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.instantiation}
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.instantiation}
*
*
* Another way to construct the client is using a {@link HttpPipeline}. The pipeline gives the client an
* authenticated way to communicate with the service. Set the pipeline with {@link #pipeline(HttpPipeline) this} and
* set the service endpoint with {@link #endpoint(String) this}. Using a
- * pipeline requires additional setup but allows for finer control on how the {@link FormRecognizerClient} and
- * {@link FormRecognizerAsyncClient} is built.
+ * pipeline requires additional setup but allows for finer control on how the {@link DocumentAnalysisClient} and
+ * {@link DocumentAnalysisAsyncClient} is built.
*
*
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerClient.pipeline.instantiation}
+ * {@codesnippet com.azure.ai.formrecognizer.DocumentAnalysisClient.pipeline.instantiation}
*
- * @see FormRecognizerAsyncClient
- * @see FormRecognizerClient
+ * @see DocumentAnalysisAsyncClient
+ * @see DocumentAnalysisClient
*/
-@ServiceClientBuilder(serviceClients = {FormRecognizerAsyncClient.class, FormRecognizerClient.class})
-public final class FormRecognizerClientBuilder {
- private final ClientLogger logger = new ClientLogger(FormRecognizerClientBuilder.class);
+@ServiceClientBuilder(serviceClients = {DocumentAnalysisAsyncClient.class, DocumentAnalysisClient.class})
+public final class DocumentAnalysisClientBuilder {
+ private final ClientLogger logger = new ClientLogger(DocumentAnalysisClientBuilder.class);
private final List perCallPolicies = new ArrayList<>();
private final List perRetryPolicies = new ArrayList<>();
@@ -76,43 +75,43 @@ public final class FormRecognizerClientBuilder {
private Configuration configuration;
private RetryPolicy retryPolicy;
private TokenCredential tokenCredential;
- private FormRecognizerServiceVersion version;
+ private DocumentAnalysisServiceVersion version;
/**
- * Creates a {@link FormRecognizerClient} based on options set in the builder. Every time
- * {@code buildClient()} is called a new instance of {@link FormRecognizerClient} is created.
+ * Creates a {@link DocumentAnalysisClient} based on options set in the builder. Every time
+ * {@code buildClient()} is called a new instance of {@link DocumentAnalysisClient} is created.
*
*
* If {@link #pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
- * {@link #endpoint(String) endpoint} are used to create the {@link FormRecognizerClient client}. All other builder
+ * {@link #endpoint(String) endpoint} are used to create the {@link DocumentAnalysisClient client}. All other builder
* settings are ignored.
*
*
- * @return A FormRecognizerClient with the options set from the builder.
+ * @return A DocumentAnalysisClient with the options set from the builder.
* @throws NullPointerException if {@link #endpoint(String) endpoint} or
* {@link #credential(AzureKeyCredential)} has not been set.
* @throws IllegalArgumentException if {@link #endpoint(String) endpoint} cannot be parsed into a valid URL.
*/
- public FormRecognizerClient buildClient() {
- return new FormRecognizerClient(buildAsyncClient());
+ public DocumentAnalysisClient buildClient() {
+ return new DocumentAnalysisClient(buildAsyncClient());
}
/**
- * Creates a {@link FormRecognizerAsyncClient} based on options set in the builder. Every time
- * {@code buildAsyncClient()} is called a new instance of {@link FormRecognizerAsyncClient} is created.
+ * Creates a {@link DocumentAnalysisAsyncClient} based on options set in the builder. Every time
+ * {@code buildAsyncClient()} is called a new instance of {@link DocumentAnalysisAsyncClient} is created.
*
*
* If {@link #pipeline(HttpPipeline) pipeline} is set, then the {@code pipeline} and
- * {@link #endpoint(String) endpoint} are used to create the {@link FormRecognizerClient client}. All other builder
+ * {@link #endpoint(String) endpoint} are used to create the {@link DocumentAnalysisClient client}. All other builder
* settings are ignored.
*
*
- * @return A FormRecognizerAsyncClient with the options set from the builder.
+ * @return A DocumentAnalysisAsyncClient with the options set from the builder.
* @throws NullPointerException if {@link #endpoint(String) endpoint} or {@link #credential(AzureKeyCredential)}
* has not been set.
* @throws IllegalArgumentException if {@link #endpoint(String) endpoint} cannot be parsed into a valid URL.
*/
- public FormRecognizerAsyncClient buildAsyncClient() {
+ public DocumentAnalysisAsyncClient buildAsyncClient() {
// Endpoint cannot be null, which is required in request authentication
Objects.requireNonNull(endpoint, "'Endpoint' is required and can not be null.");
@@ -121,34 +120,34 @@ public FormRecognizerAsyncClient buildAsyncClient() {
? Configuration.getGlobalConfiguration().clone() : configuration;
// Service Version
- final FormRecognizerServiceVersion serviceVersion =
- version != null ? version : FormRecognizerServiceVersion.getLatest();
+ final DocumentAnalysisServiceVersion serviceVersion =
+ version != null ? version : DocumentAnalysisServiceVersion.getLatest();
HttpPipeline pipeline = httpPipeline;
// Create a default Pipeline if it is not given
if (pipeline == null) {
- pipeline = buildHttpPipeline(clientOptions, httpLogOptions, buildConfiguration,
+ pipeline = Utility.buildHttpPipeline(clientOptions, httpLogOptions, buildConfiguration,
retryPolicy, credential, tokenCredential, perCallPolicies, perRetryPolicies, httpClient);
}
final FormRecognizerClientImpl formRecognizerAPI = new FormRecognizerClientImplBuilder()
- .endpoint(endpoint)
- .apiVersion(serviceVersion.getVersion())
- .pipeline(pipeline)
- .buildClient();
+ .endpoint(endpoint)
+ .apiVersion(serviceVersion.getVersion())
+ .pipeline(pipeline)
+ .buildClient();
- return new FormRecognizerAsyncClient(formRecognizerAPI, serviceVersion);
+ return new DocumentAnalysisAsyncClient(formRecognizerAPI, serviceVersion);
}
/**
- * Sets the service endpoint for the Azure Form Recognizer instance.
+ * Sets the service endpoint for the Azure Document Analysis instance.
*
- * @param endpoint The URL of the Azure Form Recognizer instance service requests to and receive responses from.
+ * @param endpoint The URL of the Azure Document Analysis instance service requests to and receive responses from.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
* @throws NullPointerException if {@code endpoint} is null
* @throws IllegalArgumentException if {@code endpoint} cannot be parsed into a valid URL.
*/
- public FormRecognizerClientBuilder endpoint(String endpoint) {
+ public DocumentAnalysisClientBuilder endpoint(String endpoint) {
Objects.requireNonNull(endpoint, "'endpoint' cannot be null.");
try {
@@ -168,15 +167,15 @@ public FormRecognizerClientBuilder endpoint(String endpoint) {
/**
* Sets the {@link AzureKeyCredential} to use when authenticating HTTP requests for this
- * FormRecognizerClientBuilder.
+ * DocumentAnalysisClientBuilder.
*
- * @param apiKeyCredential {@link AzureKeyCredential} API key credential
+ * @param azureKeyCredential {@link AzureKeyCredential} API key credential
*
- * @return The updated FormRecognizerClientBuilder object.
- * @throws NullPointerException If {@code apiKeyCredential} is null.
+ * @return The updated DocumentAnalysisClientBuilder object.
+ * @throws NullPointerException If {@code azureKeyCredential} is null.
*/
- public FormRecognizerClientBuilder credential(AzureKeyCredential apiKeyCredential) {
- this.credential = Objects.requireNonNull(apiKeyCredential, "'apiKeyCredential' cannot be null.");
+ public DocumentAnalysisClientBuilder credential(AzureKeyCredential azureKeyCredential) {
+ this.credential = Objects.requireNonNull(azureKeyCredential, "'azureKeyCredential' cannot be null.");
return this;
}
@@ -184,10 +183,10 @@ public FormRecognizerClientBuilder credential(AzureKeyCredential apiKeyCredentia
* Sets the {@link TokenCredential} used to authenticate HTTP requests.
*
* @param tokenCredential {@link TokenCredential} used to authenticate HTTP requests.
- * @return The updated {@link FormRecognizerClientBuilder} object.
+ * @return The updated {@link DocumentAnalysisClientBuilder} object.
* @throws NullPointerException If {@code tokenCredential} is null.
*/
- public FormRecognizerClientBuilder credential(TokenCredential tokenCredential) {
+ public DocumentAnalysisClientBuilder credential(TokenCredential tokenCredential) {
this.tokenCredential = Objects.requireNonNull(tokenCredential, "'tokenCredential' cannot be null.");
return this;
}
@@ -200,15 +199,15 @@ public FormRecognizerClientBuilder credential(TokenCredential tokenCredential) {
*
* @param logOptions The logging configuration to use when sending and receiving HTTP requests/responses.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder httpLogOptions(HttpLogOptions logOptions) {
+ public DocumentAnalysisClientBuilder httpLogOptions(HttpLogOptions logOptions) {
this.httpLogOptions = logOptions;
return this;
}
/**
- * Gets the default Azure Form Recognizer client headers and query parameters that are logged by default if
+ * Gets the default Azure Document Analysis client headers and query parameters that are logged by default if
* HTTP logging is enabled.
*
* @return The default {@link HttpLogOptions} allow list.
@@ -221,9 +220,9 @@ public static HttpLogOptions getDefaultLogOptions() {
* Sets the client options such as application ID and custom headers to set on a request.
*
* @param clientOptions The client options.
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder clientOptions(ClientOptions clientOptions) {
+ public DocumentAnalysisClientBuilder clientOptions(ClientOptions clientOptions) {
this.clientOptions = clientOptions;
return this;
}
@@ -233,10 +232,10 @@ public FormRecognizerClientBuilder clientOptions(ClientOptions clientOptions) {
*
* @param policy The retry policy for service requests.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
* @throws NullPointerException If {@code policy} is null.
*/
- public FormRecognizerClientBuilder addPolicy(HttpPipelinePolicy policy) {
+ public DocumentAnalysisClientBuilder addPolicy(HttpPipelinePolicy policy) {
Objects.requireNonNull(policy, "'policy' cannot be null.");
if (policy.getPipelinePosition() == HttpPipelinePosition.PER_CALL) {
@@ -252,9 +251,9 @@ public FormRecognizerClientBuilder addPolicy(HttpPipelinePolicy policy) {
*
* @param client The HTTP client to use for requests.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder httpClient(HttpClient client) {
+ public DocumentAnalysisClientBuilder httpClient(HttpClient client) {
if (this.httpClient != null && client == null) {
logger.info("HttpClient is being set to 'null' when it was previously configured.");
}
@@ -267,14 +266,14 @@ public FormRecognizerClientBuilder httpClient(HttpClient client) {
* Sets the HTTP pipeline to use for the service client.
*
* If {@code pipeline} is set, all other settings are ignored, aside from
- * {@link FormRecognizerClientBuilder#endpoint(String) endpoint} to build {@link FormRecognizerAsyncClient} or
- * {@link FormRecognizerClient}.
+ * {@link DocumentAnalysisClientBuilder#endpoint(String) endpoint} to build {@link DocumentAnalysisAsyncClient} or
+ * {@link DocumentAnalysisClient}.
*
* @param httpPipeline The HTTP pipeline to use for sending service requests and receiving responses.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder pipeline(HttpPipeline httpPipeline) {
+ public DocumentAnalysisClientBuilder pipeline(HttpPipeline httpPipeline) {
if (this.httpPipeline != null && httpPipeline == null) {
logger.info("HttpPipeline is being set to 'null' when it was previously configured.");
}
@@ -291,9 +290,9 @@ public FormRecognizerClientBuilder pipeline(HttpPipeline httpPipeline) {
*
* @param configuration The configuration store used to.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder configuration(Configuration configuration) {
+ public DocumentAnalysisClientBuilder configuration(Configuration configuration) {
this.configuration = configuration;
return this;
}
@@ -301,30 +300,30 @@ public FormRecognizerClientBuilder configuration(Configuration configuration) {
/**
* Sets the {@link RetryPolicy#RetryPolicy()} that is used when each request is sent.
*
- * The default retry policy will be used if not provided {@link FormRecognizerClientBuilder#buildAsyncClient()}
- * to build {@link FormRecognizerAsyncClient} or {@link FormRecognizerClient}.
+ * The default retry policy will be used if not provided {@link DocumentAnalysisClientBuilder#buildAsyncClient()}
+ * to build {@link DocumentAnalysisAsyncClient} or {@link DocumentAnalysisClient}.
*
* @param retryPolicy user's retry policy applied to each request.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder retryPolicy(RetryPolicy retryPolicy) {
+ public DocumentAnalysisClientBuilder retryPolicy(RetryPolicy retryPolicy) {
this.retryPolicy = retryPolicy;
return this;
}
/**
- * Sets the {@link FormRecognizerServiceVersion} that is used when making API requests.
+ * Sets the {@link DocumentAnalysisServiceVersion} that is used when making API requests.
*
* If a service version is not provided, the service version that will be used will be the latest known service
* version based on the version of the client library being used. If no service version is specified, updating to a
* newer version the client library will have the result of potentially moving to a newer service version.
*
- * @param version {@link FormRecognizerServiceVersion} of the service to be used when making requests.
+ * @param version {@link DocumentAnalysisServiceVersion} of the service to be used when making requests.
*
- * @return The updated FormRecognizerClientBuilder object.
+ * @return The updated DocumentAnalysisClientBuilder object.
*/
- public FormRecognizerClientBuilder serviceVersion(FormRecognizerServiceVersion version) {
+ public DocumentAnalysisClientBuilder serviceVersion(DocumentAnalysisServiceVersion version) {
this.version = version;
return this;
}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerServiceVersion.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisServiceVersion.java
similarity index 62%
rename from sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerServiceVersion.java
rename to sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisServiceVersion.java
index 6e96a06e81862..46b8fafca1863 100644
--- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerServiceVersion.java
+++ b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/DocumentAnalysisServiceVersion.java
@@ -8,13 +8,12 @@
/**
* The versions of Azure Form Recognizer supported by this client library.
*/
-public enum FormRecognizerServiceVersion implements ServiceVersion {
- V2_0("v2.0"),
- V2_1("v2.1");
+public enum DocumentAnalysisServiceVersion implements ServiceVersion {
+ V2021_09_30_PREVIEW("2021-09-30-preview");
private final String version;
- FormRecognizerServiceVersion(String version) {
+ DocumentAnalysisServiceVersion(String version) {
this.version = version;
}
@@ -29,9 +28,9 @@ public String getVersion() {
/**
* Gets the latest service version supported by this client library
*
- * @return the latest {@link FormRecognizerServiceVersion}
+ * @return the latest {@link DocumentAnalysisServiceVersion}
*/
- public static FormRecognizerServiceVersion getLatest() {
- return V2_1;
+ public static DocumentAnalysisServiceVersion getLatest() {
+ return V2021_09_30_PREVIEW;
}
}
diff --git a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java b/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java
deleted file mode 100644
index 928dbd1f4c6b9..0000000000000
--- a/sdk/formrecognizer/azure-ai-formrecognizer/src/main/java/com/azure/ai/formrecognizer/FormRecognizerAsyncClient.java
+++ /dev/null
@@ -1,1287 +0,0 @@
-// Copyright (c) Microsoft Corporation. All rights reserved.
-// Licensed under the MIT License.
-
-package com.azure.ai.formrecognizer;
-
-import com.azure.ai.formrecognizer.implementation.FormRecognizerClientImpl;
-import com.azure.ai.formrecognizer.implementation.Utility;
-import com.azure.ai.formrecognizer.implementation.models.AnalyzeOperationResult;
-import com.azure.ai.formrecognizer.implementation.models.ContentType;
-import com.azure.ai.formrecognizer.implementation.models.Language;
-import com.azure.ai.formrecognizer.implementation.models.Locale;
-import com.azure.ai.formrecognizer.implementation.models.OperationStatus;
-import com.azure.ai.formrecognizer.implementation.models.SourcePath;
-import com.azure.ai.formrecognizer.models.FormContentType;
-import com.azure.ai.formrecognizer.models.FormPage;
-import com.azure.ai.formrecognizer.models.FormRecognizerErrorInformation;
-import com.azure.ai.formrecognizer.models.FormRecognizerException;
-import com.azure.ai.formrecognizer.models.FormRecognizerLocale;
-import com.azure.ai.formrecognizer.models.FormRecognizerOperationResult;
-import com.azure.ai.formrecognizer.models.RecognizeBusinessCardsOptions;
-import com.azure.ai.formrecognizer.models.RecognizeContentOptions;
-import com.azure.ai.formrecognizer.models.RecognizeCustomFormsOptions;
-import com.azure.ai.formrecognizer.models.RecognizeIdentityDocumentOptions;
-import com.azure.ai.formrecognizer.models.RecognizeInvoicesOptions;
-import com.azure.ai.formrecognizer.models.RecognizeReceiptsOptions;
-import com.azure.ai.formrecognizer.models.RecognizedForm;
-import com.azure.core.annotation.ReturnType;
-import com.azure.core.annotation.ServiceClient;
-import com.azure.core.annotation.ServiceMethod;
-import com.azure.core.http.HttpPipeline;
-import com.azure.core.http.rest.Response;
-import com.azure.core.util.Context;
-import com.azure.core.util.logging.ClientLogger;
-import com.azure.core.util.polling.LongRunningOperationStatus;
-import com.azure.core.util.polling.PollResponse;
-import com.azure.core.util.polling.PollerFlux;
-import com.azure.core.util.polling.PollingContext;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
-
-import java.nio.ByteBuffer;
-import java.util.List;
-import java.util.Objects;
-import java.util.UUID;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-import static com.azure.ai.formrecognizer.Transforms.toRecognizedForm;
-import static com.azure.ai.formrecognizer.Transforms.toRecognizedLayout;
-import static com.azure.ai.formrecognizer.implementation.Utility.DEFAULT_POLL_INTERVAL;
-import static com.azure.ai.formrecognizer.implementation.Utility.detectContentType;
-import static com.azure.ai.formrecognizer.implementation.Utility.parseModelId;
-import static com.azure.ai.formrecognizer.implementation.Utility.urlActivationOperation;
-import static com.azure.core.util.FluxUtil.monoError;
-
-/**
- * This class provides an asynchronous client that contains all the operations that apply to Azure Form Recognizer.
- * Operations allowed by the client are recognizing receipt, business card, invoice and identity document data from
- * input documents, extracting layout information, analyzing custom forms for predefined data.
- *
- *
Instantiating an asynchronous Form Recognizer Client
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.instantiation}
- *
- * @see FormRecognizerClientBuilder
- */
-@ServiceClient(builder = FormRecognizerClientBuilder.class, isAsync = true)
-public final class FormRecognizerAsyncClient {
- private final ClientLogger logger = new ClientLogger(FormRecognizerAsyncClient.class);
- private final FormRecognizerClientImpl service;
- private final FormRecognizerServiceVersion serviceVersion;
-
- /**
- * Create a {@link FormRecognizerAsyncClient} that sends requests to the Form Recognizer service's endpoint. Each
- * service call goes through the {@link FormRecognizerClientBuilder#pipeline(HttpPipeline)} http pipeline}.
- *
- * @param service The proxy service used to perform REST calls.
- * @param serviceVersion The versions of Azure Form Recognizer supported by this client library.
- */
- FormRecognizerAsyncClient(FormRecognizerClientImpl service, FormRecognizerServiceVersion serviceVersion) {
- this.service = service;
- this.serviceVersion = serviceVersion;
- }
-
- /**
- * Recognizes form data from documents using optical character recognition (OCR) and a custom trained
- * model with or without labels.
- * The service does not support cancellation of the long running operation and returns with an
- * error message indicating absence of cancellation support.
- *
- * Code sample
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl#string-string}
- *
- * @param modelId The UUID string format custom trained model Id to be used.
- * @param formUrl The URL of the form to analyze.
- *
- * @return A {@link PollerFlux} that polls the recognize custom form operation until it has completed, has failed,
- * or has been cancelled. The completed operation returns a list of {@link RecognizedForm}.
- * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with
- * an {@link OperationStatus#FAILED}.
- * @throws NullPointerException If {@code formUrl}, {@code modelId} is null.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux>
- beginRecognizeCustomFormsFromUrl(String modelId, String formUrl) {
- return beginRecognizeCustomFormsFromUrl(modelId, formUrl, null);
- }
-
- /**
- * Recognizes form data from documents using optical character recognition (OCR) and a custom trained
- * model.
- * The service does not support cancellation of the long running operation and returns with an
- * error message indicating absence of cancellation support.
- *
- * Code sample
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomFormsFromUrl#string-string-RecognizeCustomFormsOptions}
- *
- * @param modelId The UUID string format custom trained model Id to be used.
- * @param formUrl The source URL to the input form.
- * @param recognizeCustomFormsOptions The additional configurable
- * {@link RecognizeCustomFormsOptions options} that may be passed when recognizing custom forms.
- *
- * @return A {@link PollerFlux} that polls the recognize custom form operation until it has completed, has failed,
- * or has been cancelled. The completed operation returns a list of {@link RecognizedForm}.
- * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with
- * an {@link OperationStatus#FAILED}.
- * @throws NullPointerException If {@code formUrl}, {@code modelId} is null.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux>
- beginRecognizeCustomFormsFromUrl(String modelId, String formUrl,
- RecognizeCustomFormsOptions recognizeCustomFormsOptions) {
- return beginRecognizeCustomFormsFromUrl(formUrl, modelId, recognizeCustomFormsOptions, Context.NONE);
- }
-
- PollerFlux>
- beginRecognizeCustomFormsFromUrl(String formUrl, String modelId,
- RecognizeCustomFormsOptions recognizeCustomFormsOptions,
- Context context) {
- try {
- Objects.requireNonNull(formUrl, "'formUrl' is required and cannot be null.");
- Objects.requireNonNull(modelId, "'modelId' is required and cannot be null.");
-
- final RecognizeCustomFormsOptions finalRecognizeCustomFormsOptions
- = getRecognizeCustomFormOptions(recognizeCustomFormsOptions);
- final boolean isFieldElementsIncluded = finalRecognizeCustomFormsOptions.isFieldElementsIncluded();
- return new PollerFlux<>(
- finalRecognizeCustomFormsOptions.getPollInterval(),
- urlActivationOperation(() ->
- service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId),
- isFieldElementsIncluded,
- finalRecognizeCustomFormsOptions.getPages(),
- new SourcePath().setSource(formUrl),
- context)
- .map(response -> new FormRecognizerOperationResult(
- parseModelId(response.getDeserializedHeaders().getOperationLocation()))),
- logger),
- pollingOperation(resultUid ->
- service.getAnalyzeFormResultWithResponseAsync(UUID.fromString(modelId), resultUid, context)),
- (activationResponse, pollingContext) ->
- Mono.error(new RuntimeException("Cancellation is not supported")),
- fetchingOperation(resultId -> service.getAnalyzeFormResultWithResponseAsync(
- UUID.fromString(modelId), resultId, context))
- .andThen(after -> after.map(modelSimpleResponse ->
- toRecognizedForm(modelSimpleResponse.getValue().getAnalyzeResult(),
- isFieldElementsIncluded,
- modelId))
- .onErrorMap(Utility::mapToHttpResponseExceptionIfExists)));
- } catch (RuntimeException ex) {
- return PollerFlux.error(ex);
- }
- }
-
- /**
- * Recognizes form data from documents using optical character recognition (OCR) and a custom trained
- * model with or without labels.
- * The service does not support cancellation of the long running operation and returns with an
- * error message indicating absence of cancellation support.
- *
- * Note that the {@code data} passed must be replayable if retries are enabled (the default). In other words, the
- * {@code Flux} must produce the same data each time it is subscribed to.
- *
- * Code sample
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomForms#string-Flux-long}
- *
- * @param modelId The UUID string format custom trained model Id to be used.
- * @param form The data of the form to recognize form information from.
- * @param length The exact length of the data.
- *
- * @return A {@link PollerFlux} that polls the recognize custom form operation until it has completed, has failed,
- * or has been cancelled. The completed operation returns a list of {@link RecognizedForm}.
- * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with
- * an {@link OperationStatus#FAILED}.
- * @throws NullPointerException If {@code form}, {@code modelId} is null.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux>
- beginRecognizeCustomForms(String modelId, Flux form, long length) {
- return beginRecognizeCustomForms(modelId, form, length, null);
- }
-
- /**
- * Recognizes form data from documents using optical character recognition (OCR) and a custom trained
- * model with or without labels.
- * The service does not support cancellation of the long running operation and returns with an
- * error message indicating absence of cancellation support.
- *
- * Note that the {@code data} passed must be replayable if retries are enabled (the default). In other words, the
- * {@code Flux} must produce the same data each time it is subscribed to.
- *
- * Code sample
- * {@codesnippet com.azure.ai.formrecognizer.FormRecognizerAsyncClient.beginRecognizeCustomForms#string-Flux-long-RecognizeCustomFormsOptions}
- *
- * @param modelId The UUID string format custom trained model Id to be used.
- * @param form The data of the form to recognize form information from.
- * @param length The exact length of the data.
- * @param recognizeCustomFormsOptions The additional configurable
- * {@link RecognizeCustomFormsOptions options} that may be passed when recognizing custom forms.
- *
- * @return A {@link PollerFlux} that polls the recognize custom form operation until it has completed, has failed,
- * or has been cancelled. The completed operation returns a list of {@link RecognizedForm}.
- * @throws FormRecognizerException If recognize operation fails and the {@link AnalyzeOperationResult} returned with
- * an {@link OperationStatus#FAILED}.
- * @throws NullPointerException If {@code form}, {@code modelId} is null.
- */
- @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
- public PollerFlux>
- beginRecognizeCustomForms(String modelId, Flux form, long length,
- RecognizeCustomFormsOptions recognizeCustomFormsOptions) {
- return beginRecognizeCustomForms(modelId, form, length, recognizeCustomFormsOptions, Context.NONE);
- }
-
- PollerFlux>
- beginRecognizeCustomForms(String modelId, Flux form, long length,
- RecognizeCustomFormsOptions recognizeCustomFormsOptions, Context context) {
- try {
- Objects.requireNonNull(form, "'form' is required and cannot be null.");
- Objects.requireNonNull(modelId, "'modelId' is required and cannot be null.");
-
- final RecognizeCustomFormsOptions finalRecognizeCustomFormsOptions
- = getRecognizeCustomFormOptions(recognizeCustomFormsOptions);
- final boolean isFieldElementsIncluded = finalRecognizeCustomFormsOptions.isFieldElementsIncluded();
- return new PollerFlux<>(
- finalRecognizeCustomFormsOptions.getPollInterval(),
- streamActivationOperation(
- contentType -> service.analyzeWithCustomModelWithResponseAsync(UUID.fromString(modelId),
- ContentType.fromString(contentType.toString()),
- isFieldElementsIncluded,
- finalRecognizeCustomFormsOptions.getPages(),
- form,
- length,
- context)
- .map(response ->
- new FormRecognizerOperationResult(
- parseModelId(response.getDeserializedHeaders().getOperationLocation()))),
- form, finalRecognizeCustomFormsOptions.getContentType()),
- pollingOperation(
- resultUuid -> service.getAnalyzeFormResultWithResponseAsync(
- UUID.fromString(modelId), resultUuid, context)),
- (activationResponse, pollingContext) ->
- Mono.error(new RuntimeException("Cancellation is not supported")),
- fetchingOperation(resultId -> service.getAnalyzeFormResultWithResponseAsync(
- UUID.fromString(modelId), resultId, context))
- .andThen(after -> after.map(modelSimpleResponse ->
- toRecognizedForm(modelSimpleResponse.getValue().getAnalyzeResult(),
- isFieldElementsIncluded,
- modelId))
- .onErrorMap(Utility::mapToHttpResponseExceptionIfExists)));
- } catch (RuntimeException ex) {
- return PollerFlux.error(ex);
- }
- }
-
- /**
- * Recognizes content/layout data from documents using optical character recognition (OCR).
- *